Skip to content

Commit

Permalink
Merge pull request #13 from kusitms-28th-Meetup-E/feat/global
Browse files Browse the repository at this point in the history
fix : authorization edit
  • Loading branch information
seungueonn authored Nov 22, 2023
2 parents 67ddcd7 + 5e4c126 commit 461fc3a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ public GatewayFilter apply(Config config) {

HttpHeaders headers = request.getHeaders();
if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
return onError(exchange, NoSuchFieldException.class);
// return onError(exchange, NoSuchFieldException.class);
// headers.add("Authorization","guest");
ServerHttpRequest newRequest = request.mutate()
.header("user-id", "guest")
.build();
return chain.filter(exchange.mutate().request(newRequest).build());

}

String authorizationHeader = headers.get(HttpHeaders.AUTHORIZATION).get(0);
Expand Down

0 comments on commit 461fc3a

Please sign in to comment.