Skip to content

Keep headers from original response in map local #792

@lkipke

Description

@lkipke

Proxyman version?

Proxyman 2.18.0

macOS Version?

mac 10.14.6

Steps to reproduce

  1. Create a "Map local" rule that maps to a JSON file.
  2. Send the request (from Chrome, for example)
  3. Observe that the response headers all get removed, and replaced with default headers:
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 11661
    X-Proxyman-Map-Local: Serve from file: /path/to/file.json
    

Expected behavior

Since my map local rule only rewrites the body, I would expect that all of the original response headers are kept on the response (except probably Content-Length). Currently, this prevents CORS-enabled requests, because the Access-Control-Allow-Origin header is removed from the response.

I think that I can work around this by using the scripting tool, but it'd be nice to have the map local tool support it as well 😄 Also, this is a great product -- love it so far!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions