Skip to content
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

Avoid returning invalid domain when using USE_SUBDOMAIN=True in dev #6026

Merged
merged 1 commit into from Aug 21, 2019

Conversation

@humitos
Copy link
Member

@humitos humitos commented Aug 1, 2019

When running in development with USE_SUBDOMAIN=True and
PRODUCTION_DOMAIN=dev.readthedocs.io:8000 we receive an error when
accessing the docs.

This allows this case to succeed,
skip these checks and serve the docs properly.

When running in development with USE_SUBDOMAIN=True and
PRODUCTION_DOMAIN=dev.readthedocs.io:8000 we receive an error when
accessing the docs.

This allows this case to succeed,
skip these checks and serve the docs properly.
@@ -61,7 +61,7 @@ def process_request(self, request):
# Serve CNAMEs
if (
public_domain not in host and
settings.PRODUCTION_DOMAIN not in host and
settings.PRODUCTION_DOMAIN not in (host, full_host) and
Copy link
Member

@stsewd stsewd Aug 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the same as the previous logic. This is checking that production_domain is exactly the same as host or full_host. Or that is what this change is for?

Loading

Copy link
Member Author

@humitos humitos Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That's the intended change and it's because in development the PRODUCTION_DOMAIN contains the port which is not in host but it's on full_host.

Loading

@humitos humitos requested a review from Aug 21, 2019
stsewd
stsewd approved these changes Aug 21, 2019
@humitos humitos merged commit 83f7b66 into master Aug 21, 2019
2 checks passed
Loading
@humitos humitos deleted the humitos/use-subdomain-locally branch Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants