Skip to content

marcosbarbero/spring-cloud-starter-zuul-transformation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Cloud Zuul - Request Transformation

Request transformation starter for Spring Cloud Netflix Zuul

Usage

This project is available on maven central

Add the dependency on pom.xml

<dependency>
    <groupId>com.marcosbarbero.cloud</groupId>
    <artifactId>spring-cloud-zuul-transformation</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

Sample Configuration

zuul:
  transformer:
    enabled: true
    policies:
      the-service-name:
        request:
          add:
            methods: get,post
            ignored-paths: /xpto/**
            headers: header-name:default-value
            query-string: param1:defaul-value
            body: param-name:default-value
          replace:
            methods: get,post
            ignored-paths: /xpto/**
            headers: old-header-name:new-header-name
            query-string: param1:new-param-name
            body: old-param-name:new-param-name
          remove:
            methods: get,post
            ignored-paths: /xpto/**
            headers: any-http-header
            query-string: param1,param2,param3
            body: param1,param2,param3
        response:
          add:
            headers: header-name:default-value
            body: param-name:default-value
          replace:
            headers: old-header-name:new-header-name
            body: old-param-name:new-param-name
          remove:
            headers: header-name
            body: param1,param2

Any doubt open an issue.
Any fix send me a Pull Request.

About

Transformation starter for Spring Cloud Netflix Zuul

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages