-
Notifications
You must be signed in to change notification settings - Fork 602
The swagger urls are not using the SCRIPT_NAME header #494
Comments
@bobkarreman Can you be more specific in describing the problem? |
Yes of course, sorry if its not clear. I have a django app with django-rest-framework and django-rest-swagger deployed like this: /my-subfolder/actual-django-folder/swagger/ I had the same issue in the beginning with the django-admin but that I fixed by setting the SCRIPT_NAME header from nginx. @marcgibbons I hope it makes a bit more sense now :-) |
@bobkarreman Yes, thank you! To summarize then, the renderers are working correctly, but the URLs in the specification to the endpoints is incorrect? This is likely an issue to open on the Django REST Framework project, since it is responsible for generating the schema describing the API and setting the URIs. However, I am working on providing configurations and overrides in this project, so we could set a base path and all the endpoints then become relative to that base. |
@marcgibbons Thnx! I will create a ticket on the Django REST Framework then as well to make sure that the schema generation is done correctly on that side. And allowing to overwrite the base path in a configuration also seems like a nice alternative option. |
Resolved by 3.4.1. |
Thank you! Closing. |
I have a django app deployed in a subfolder with a reverse proxy.
For django to work properly I set the SCRIPT_NAME header, but swagger is not using that.
Causing all urls to be wrong.
The text was updated successfully, but these errors were encountered: