netflix-zuul

Zuul CORS filter doesn't work

徘徊边缘 提交于 2021-02-08 12:10:13
问题 So, basically, the front-end uses reactJS, the back-end Spring Boot (microservices, with zuul acting as the gateway), and of course they can't do anything without CORS stuff. We used this piece of code @Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin("*"); config.addAllowedHeader("*"); config

Zuul CORS filter doesn't work

 ̄綄美尐妖づ 提交于 2021-02-08 12:06:26
问题 So, basically, the front-end uses reactJS, the back-end Spring Boot (microservices, with zuul acting as the gateway), and of course they can't do anything without CORS stuff. We used this piece of code @Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin("*"); config.addAllowedHeader("*"); config

JHipster - How to add route to external microservices in application.yml

一笑奈何 提交于 2021-01-29 10:42:30
问题 I'm using Jhipster 5.5.0 to build a zuul gateway capable to route rest request to different microservices. Some of this microservices are developed in different languages, deployed and running on different server. Every microservices is protected via OIDC using the same keycloak server, under different realms. Now I need to configure zuul route on application.yml properties file of my gateway app, to access this service by external rest client (customers) and using zuul for filtering request

Spring cloud zuul does not load static resources from spring boot applications

对着背影说爱祢 提交于 2021-01-29 00:06:16
问题 I have a simple gateway that implemented with zuul as you can see below: application.properties file: zuul.routes.looli.url=http://localhost:8082 ribbon.eureka.enabled=false server.port=8070 RoutingAndFilteringGatewayApplication class: @EnableZuulProxy @SpringBootApplication public class RoutingAndFilteringGatewayApplication { public static void main(String[] args) { SpringApplication.run(RoutingAndFilteringGatewayApplication.class, args); } @Bean public SimpleFilter simpleFilter() { return

Spring cloud zuul does not load static resources from spring boot applications

那年仲夏 提交于 2021-01-28 23:57:16
问题 I have a simple gateway that implemented with zuul as you can see below: application.properties file: zuul.routes.looli.url=http://localhost:8082 ribbon.eureka.enabled=false server.port=8070 RoutingAndFilteringGatewayApplication class: @EnableZuulProxy @SpringBootApplication public class RoutingAndFilteringGatewayApplication { public static void main(String[] args) { SpringApplication.run(RoutingAndFilteringGatewayApplication.class, args); } @Bean public SimpleFilter simpleFilter() { return

Spring boot SAML 2 authentication object null

允我心安 提交于 2021-01-28 21:10:52
问题 I've a requirement to integrate SAML authentication with rest API, so that I can make my rest services stateless, the approach which I've taken is as follows Developed an authentication service behind zuul proxy which is running behind AWS ALB User tries to generate token via endpoint https://my-domain/as/auth/login Since user is not logged in, so he gets redirected to IDP where he authenticate After authentication the IDP redirect user back to my service i.e. at URL https://my-domain/as/auth

Modify request/response based on routing (spring boot )

北战南征 提交于 2021-01-28 07:16:04
问题 Let me try to explain the diagram and problem that I want to solve. The product has multiple services (GET, DELETE, POST, PUT). All products have different payload and header requirement. e.g - product 1 expects user-id, department-id, and token - in order to make the service work. For post, it might need some payload modification. product 2 expects a simple token with some additional headers and also some payload modifications. product 3 is directly exposed with no modifications. The actor

how to route to an external url using zuul proxy filter

久未见 提交于 2021-01-22 08:24:20
问题 i have an external url and i want to pass some request header through zuul filter to launch the application. Can anyone please help me on this. In my custom prefilter i have written this: @Component public class CustomFilters extends ZuulFilter { public static final Logger logger = LoggerFactory.getLogger(CustomFilters.class); @Override public String filterType() { return "route"; } @Override public int filterOrder() { return 1; } @Override public boolean shouldFilter() { return true; }

how to route to an external url using zuul proxy filter

北城以北 提交于 2021-01-22 08:21:09
问题 i have an external url and i want to pass some request header through zuul filter to launch the application. Can anyone please help me on this. In my custom prefilter i have written this: @Component public class CustomFilters extends ZuulFilter { public static final Logger logger = LoggerFactory.getLogger(CustomFilters.class); @Override public String filterType() { return "route"; } @Override public int filterOrder() { return 1; } @Override public boolean shouldFilter() { return true; }