refactor(owner-apigateway-service): cors allowedOrigins 변경

- localhost -> 명시적 url
This commit is contained in:
bum12ark
2022-03-07 11:17:58 +09:00
parent 27e6a2c3a2
commit c05f5e5718
2 changed files with 3 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ public class AuthorizationHeaderFilter extends AbstractGatewayFilterFactory<Auth
public GatewayFilter apply(Config config) {
return (exchange, chain) -> {
ServerHttpRequest request = exchange.getRequest();
log.info("AuthorizationHeaderFilter Start: request -> {}", exchange.getRequest());
HttpHeaders headers = request.getHeaders();
if (!headers.containsKey(HttpHeaders.AUTHORIZATION)) {
@@ -55,6 +56,7 @@ public class AuthorizationHeaderFilter extends AbstractGatewayFilterFactory<Auth
.header("user-id", subject)
.build();
log.info("AuthorizationHeaderFilter End");
return chain.filter(exchange.mutate().request(newRequest).build());
};
}

View File

@@ -23,7 +23,7 @@ spring:
globalcors:
cors-configurations:
'[/**]':
allowedOrigins: "http://localhost:8080"
allowedOrigins: "http://just-pickup.com:8081"
allowedMethods:
- GET
- POST