You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use the docker image from https://hub.docker.com/r/swaggerapi/swagger-ui may fail because the internal nginx server is not configured to add charset: utf-8 to the Content-Type header. As a result, HTML that doesn't specify the charset (eg, <script src="localhost:8081/swagger-ui-bundle.js"></script>) will fail because the browser fetches swagger JS files but won't use them because of the embedded UTF characters.
This is more of a FYI for others in the future who are scratching their heads over why a simple swagger install doesn't seem to work. If that's you, add charset="UTF-8" to your <script> tag.
The text was updated successfully, but these errors were encountered:
Q&A (please complete the following information)
Content & configuration
Describe the bug you're encountering
Trying to use the docker image from https://hub.docker.com/r/swaggerapi/swagger-ui may fail because the internal nginx server is not configured to add
charset: utf-8
to theContent-Type
header. As a result, HTML that doesn't specify the charset (eg,<script src="localhost:8081/swagger-ui-bundle.js"></script>
) will fail because the browser fetches swagger JS files but won't use them because of the embedded UTF characters.To reproduce...
Expected behavior
I expect that the Content-Type header includes
charset=utf-8
.Screenshots
Additional context or thoughts
This is more of a FYI for others in the future who are scratching their heads over why a simple swagger install doesn't seem to work. If that's you, add
charset="UTF-8"
to your<script>
tag.The text was updated successfully, but these errors were encountered: