|
@@ -9,6 +9,7 @@ import org.springframework.cloud.gateway.filter.GatewayFilterChain;
|
|
|
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
|
import org.springframework.cloud.gateway.filter.GlobalFilter;
|
|
|
import org.springframework.core.Ordered;
|
|
import org.springframework.core.Ordered;
|
|
|
import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
|
|
|
+import org.springframework.http.server.reactive.ServerHttpResponse;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
import org.springframework.web.server.ServerWebExchange;
|
|
|
|
|
|
|
@@ -63,6 +64,11 @@ public class GlobalAccountFilter implements GlobalFilter, Ordered{
|
|
|
Long accountId = accountManagementService.getAccountIdByDomainName(domainName);
|
|
Long accountId = accountManagementService.getAccountIdByDomainName(domainName);
|
|
|
logger.debug("获取的AccountId:" + accountId);
|
|
logger.debug("获取的AccountId:" + accountId);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ ServerHttpResponse response = exchange.getResponse();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
request.mutate().header("account", accountId.toString())
|
|
request.mutate().header("account", accountId.toString())
|
|
|
// .header("Strict-Transport-Security", "max-age=631138519")
|
|
// .header("Strict-Transport-Security", "max-age=631138519")
|
|
|
// .header("Content-Security-Policy", "img-src 'self'")
|
|
// .header("Content-Security-Policy", "img-src 'self'")
|