We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example Swagger/OpenAPI definition:
- name: "User-Agent" in: "header" description: "user agent" required: true type: "string" default: "CustomAgent"
Swagger-UI configuration options:
window.onload = function() { // Begin Swagger UI call region const ui = SwaggerUIBundle({ url: "swagger.yaml", dom_id: '#swagger-ui', deepLinking: true, presets: [ SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset ], plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], layout: "StandaloneLayout" }) // End Swagger UI call region window.ui = ui }
Browser always overrides User-Agent header and sends its own, no matter what value I type into parameter
Steps to reproduce the behavior:
Request is sent with User-Agent equal to specified parameter
Request is sent with standard browser User-Agent
The text was updated successfully, but these errors were encountered:
Hey @pikazlou!
This is the same root cause as swagger-api/swagger-js#1163 - there are certain headers that the browser doesn't let us set.
For now, this is a limitation of Swagger UI - see the linked ticket for some possible solutions.
Sorry, something went wrong.
hi @shockey Thanks for your reply! I must note that User-Agent header does work in Safari: swagger successfully sends specified value.
@shockey it certainly works in Safari.Thanks for the advice.
It also works properly in Windows Firefox -- not so much in Chrome & Edge.
No branches or pull requests
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Describe the bug you're encountering
Browser always overrides User-Agent header and sends its own, no matter what value I type into parameter
To reproduce...
Steps to reproduce the behavior:
Expected behavior
Request is sent with User-Agent equal to specified parameter
Actual behavior
Request is sent with standard browser User-Agent
The text was updated successfully, but these errors were encountered: