-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
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
Configure base URL for API schema #146
Comments
@nuwang Is it okay if I work on this one, or have you already started on this? |
@machristie Sure, that'd be great! |
machristie
added a commit
to machristie/cloudlaunch
that referenced
this issue
Apr 16, 2018
Tested this with following nginx.conf config running locally on my laptop:
Then I ran it with:
I then started cloudlaunch locally with
And now I get the desired effect when I browse the schema. |
nuwang
added a commit
that referenced
this issue
Apr 16, 2018
Issue #146: CLOUDLAUNCH_PATH_PREFIX env var
This was referenced Apr 16, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Provide a setting in settings.py that can be specified with an environment variable that will set the base URL for the API schema. This is needed when the API is behind a proxying web server that changes its path prefix, for example, for launch.usegalaxy.org.
See http://www.django-rest-framework.org/api-guide/schemas/#url
See also CloudVE/cloudlaunch-cli#6 which depends on this issue.
See also DRF issue: https://github.com/encode/django-rest-framework/issues/5788. DRF doesn't take SCRIPT_NAME into account when generating schema urls, it's expected behavior however and one needs to pass the base URL to the schema generator.
The text was updated successfully, but these errors were encountered: