These are chat archives for spring-cloud/spring-cloud

6th
Jul 2018
fintech-ninja
@fintech-ninja
Jul 06 2018 01:31
@marcosbarbero , nope. Just trying to supply username/password to authenticate with config server during bootstrap when it loads ConfigServicePropertySourceLocator.
CH4:D
@chad_d_stud_twitter
Jul 06 2018 02:45
is it possible to use spring api gateway to route non-spring services? e.g. route to a node.js endpoint cough cough
Patrick Cornelißen
@pcornelissen
Jul 06 2018 07:14
I don't think that the gateway cares what system you are routing to. It just passes data along using HTTP
But when the other system is not registering in eureka you can use a list of static IPs in ribbon or you just do requests based on the ip directly if there is only one instance
of yourse you can also use things like haproxy and acces the instances though that, although I'd suggest the ribbon route
(Or whatever client loadbalancer you use)
Marcos Barbero
@marcosbarbero
Jul 06 2018 08:14
so you probably don't need it listed in spring.factories @fintech-ninja
you are right @pcornelissen I would add just one more thing to the dynamic routing, it can be done using spring boot sidecar, in that way @chad_d_stud_twitter can solve the client side load balancing for non-jvm apps.
CH4:D
@chad_d_stud_twitter
Jul 06 2018 08:58
actually in the context in our app we just want the gateway to give the frontend access to this service. every other service we have, have no dependencies on it
we’re actually using node due to a limitation in spring oauth https://jira.spring.io/browse/SECOAUTH-425
Daniël
@dvtoever
Jul 06 2018 14:28
I succesfully created a route using Spring Cloud Gateway, however it does filter out the 'Authorization' header. How can I configure the 'sensitive' headers property (using YAML currently). It seems spring.cloud.gateway.proxy.sensitive property does not work with mvn dependency spring-cloud-starter-gateway
Spencer Gibb
@spencergibb
Jul 06 2018 15:15
@chad_d_stud_twitter absolutely. gateway doesn't care about what is downstream
Spencer Gibb
@spencergibb
Jul 06 2018 15:30
@dvtoever the core gateway doesn't have a notion of sensitive headers (the ProxyExchange object does)
KaijuDeluxe
@KaijuDeluxe
Jul 06 2018 16:28
what is wrong with my post method? It return null :)
@PostMapping("/persistProduct/{productSku}")
    public ResponseEntity<Product> persistProduct(@RequestBody Product i2sProduct, @PathVariable String productSku) {
        log.info("Updating Product with id {}", productSku);

        Product currentProd = productsRepository.findByProductsSku(productSku);

        if (currentProd == null) {
            log.error("Unable to update. Product with sku {} not found.", productSku);
            return new ResponseEntity(new EntityNotFound("Unable to upate. Product with id " + productSku + " not found."), HttpStatus.NOT_FOUND);
        } else {
            return new ResponseEntity<Product>(currentProd, HttpStatus.CREATED);

        }
    }
Spencer Gibb
@spencergibb
Jul 06 2018 16:46
@KaijuDeluxe again, not specific to spring-cloud, though I'm not sure there's a framework gitter. Something else must be wrong, that method can not return null (unless you mean the body).