dukeofharen / httplaceholder

A very flexible cross platform HTTP stub application.
MIT License
113 stars 4 forks source link

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

Closed dukeofharen closed 1 year ago

dukeofharen commented 1 year ago

Pull request type

Please check the type of change your PR introduces:

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?