Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed small issue where explicitly defined response header would be overwritten when using the reverse proxy functionality #290

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

dukeofharen
Copy link
Owner

@dukeofharen dukeofharen commented Nov 10, 2022

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Fixed small issue where explicitly defined response header would be overwritten when using the reverse proxy functionality.

What is the new behavior?

When you specifically define a response header, the response header will always overwrite the value that is set by the reverse proxy response writer.

- id: proxy-test-1
  conditions:
    method: GET
    url:
      path:
        startswith: /todoitems
  response:
    headers:
      X-Header: value-from-stub
    reverseProxy:
      url: https://jsonplaceholder.typicode.com
      appendPath: true
      appendQueryString: true
      replaceRootUrl: true

Does this introduce a breaking change?

  • Yes
  • No

@dukeofharen dukeofharen added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Nov 10, 2022
@dukeofharen dukeofharen changed the title Always overwrite Fixed small issue where explicitly defined response header would be overwritten when using the reverse proxy functionality Nov 10, 2022
@dukeofharen dukeofharen merged commit b055ab1 into master Nov 10, 2022
@dukeofharen dukeofharen deleted the feature/proxy-overwrite-headers branch November 10, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant