-
Change config at service:
-
Push change to github: config-server will auto change. You can view at url: http://localhost:8080/config/storage/default
-
To refresh config of service, run this command at every service:
curl -H "Content-Type: application/json" -d {} http://localhost:8080/{service-name}/actuator/refresh -
-
Fix spring cloud gateway CORS
-
Add global cors in application.yml https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/cors-configuration.html
-
Add config DedupeResponseHeader in application.yml https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/gatewayfilter-factories/deduperesponseheader-factory.html
-
Update @Configuration and change setAllowedOrigins to setAllowedOriginPatterns in Java https://stackoverflow.com/a/77257605 spring-cloud/spring-cloud-gateway#2946 (comment)
-
- Fix spring cloud gateway CORS websocket https://stackoverflow.com/a/73776455 https://www.springcloud.io/post/2022-03/load-balanced-websockets-with-spring-cloud-gateway/#gsc.tab=0