-
Notifications
You must be signed in to change notification settings - Fork 6
https://catalog.data.gov is redirecting to https://catalog-next.data.gov/dataset #561
Comments
This is complicated because there's essentially three reverse proxies. CloudFront, FCS Netscaler, and Apache. With our current configuration, we're expecting these headers to be passed through to all three, I'm seeing three areas for a potential fix:
Right now I'm leaning toward the FCS change. |
Discussed this with @avdata99 and @hkdctol . Andres will spend ~1 hour investigating (1) above to see if there is a fix or change that should happen in CKAN. The redirect is handled by pylons so this behavior may change anyway in CKAN 2.9. I will open a ticket with FCS for (3) and hopefully we can schedule something for Friday or Monday. |
I opened RITM0810420 for the Netscaler change. |
CKAN overrides a function in the mapper but lets routes Mapper (old v1.13) to handle the redirections Pylons in CKAN is using that routes This Mapper uses an URLGenerator that allows defining an There are some tests that can be useful to see how this The flask_app is using ckan site_url Is still not clear for me if we can override the headers at some point in CKAN |
Thanks @avdata99, that tells me that CKAN should respect the X-Forwarded-Host header, but something is still not working. Maybe gunicorn is not passing this header through. In local development, with debugging enabled, can you dump out the enviornment? The test would be:
You should see |
... and you should see the |
@adborden that what I see locally
|
Okay, and in the CKAN logs, can you dump out the environ and see if HTTP_X_FORWARDED_HOST is included? Your server is So, from the pylons/routes code, it looks like this should be supported but something is not working. We should be seeing |
@adborden if I dump the
|
👍 looks like a bug to me. |
After switching the origin servers to catalog-next, everything seemed working with the one exception:
Browsing to https://catalog.data.gov results in a redirect to https://catalog-next.data.gov/dataset
How to reproduce
Expected behavior
302 redirect to https://catalog.data.gov/dataset
Actual behavior
302 redirect to https://catalog-next.data.gov/dataset
The text was updated successfully, but these errors were encountered: