mootari
6 years agoNew Contributor
Cannot set Origin header in SwaggerHub proxy
Hi,
I'm currently documenting an internal API that requires the Origin header to be set to a specific domain (that is different from the server domain). I've added the header through a parameter, and the generated curl command correctly includes the corresponding -H argument. But:
- When I run the query through the web UI with enabled SwaggerHub proxy, I get a 404 response.
- When I run the generated curl command directly, I get a 200 response.
- When i run the generated curl command without the origin header, I get a 404 response.
This leads me to believe that the SwaggerHub proxy overrides the origin header. Do you consider this a bug, or should i look for alternative solutions (like setting up my own proxy)?
Thanks,
Fabian