PDC is properly available via https but for some reason the API doc uses http:// for links instead: https://pdc.fedoraproject.org/rest_api/v1/
http://pdc.fedoraproject.org seems to be only mentioned for copr/mbs in ansible (which is a separate issue)
Just wondering, is PDC using http:// behind proxies and therefore maybe using the wrong protocol?
This might be:
BROWSABLE_DOCUMENT_MACROS = { # need to be rewrite with the real host name when deploy. 'HOST_NAME': 'http://{{ inventory_hostname }}:80', # make consistent with rest api root. 'API_PATH': '%s%s' % (REST_API_URL, REST_API_VERSION), }
in roles/pdc/frontend/templates/settings_local.py
@ralph any ideas?
Metadata Update from @ralph: - Issue assigned to ralph
Looks like this is what we need:
https://stackoverflow.com/questions/22279893/djangorestframework-https-links-with-routers-and-viewsets
Stripping X-Forwarded-Proto shouldn't be an issue for us, since the incoming requests should all come through the proxies anyways -- the firewall should disallow requests from outside that don't come through the proxies.
X-Forwarded-Proto
OK, got this working in staging:
https://pdc.stg.fedoraproject.org/rest_api/v1/
See the following two ansible commits needed:
I guess.. let's wait until freeze is up to do this in prod?
Metadata Update from @ralph: - Issue tagged with: unfreeze
In prod: https://infrastructure.fedoraproject.org/cgit/ansible.git/commit/?id=5752ba7fcbe87e0749da05d13b7c6e9e0ae8d983
Metadata Update from @ralph: - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.