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

Proxito: allow to serve external version on development #10241

Closed
wants to merge 1 commit into from

Conversation

humitos
Copy link
Member

@humitos humitos commented Apr 12, 2023

Since we are using .devthedocs.org and .build.devthedocs.org, the public domain is included in the external domain --this does not happen in production.

So, in local development this makes the PR to not be served and detected as a "Weird variation of our domain".

I'm not 100% sure this is the correct fix or it needs to handle other cases, but at least this solves my problem locally. @stsewd I know you have been working on all this code; feel free to adapt it in case there is something missing.

Since we are using `.devthedocs.org` and `.build.devthedocs.org`, the public
domain is included in the external domain --this does not happen in production.

So, in local development this makes the PR to not be served and detected as a
"Weird variation of our domain".
@humitos humitos requested a review from a team as a code owner April 12, 2023 10:26
@humitos humitos requested a review from stsewd April 12, 2023 10:26
@stsewd
Copy link
Member

stsewd commented Apr 13, 2023

@ericholscher maybe is it worth to use another domain for external versions on development?

@ericholscher
Copy link
Member

ericholscher commented Apr 14, 2023

Seems like we can just make this check smarter? We should just check for <slug>.public_domain and not any URL that includes the public domain and any nested level of subdomains?

@stsewd
Copy link
Member

stsewd commented Apr 19, 2023

We should just check for .public_domain and not any URL that includes the public domain and any nested level of subdomains?

Yeah, we could split the domain in <rest>.<public-domain>, and check for suspicious domains only after we have checked our own public domains.

stsewd added a commit that referenced this pull request Apr 19, 2023
During development we use overlapping domains:

- devthedocs.org
- build.devthedocs.org

Closes #10241
stsewd added a commit that referenced this pull request Apr 20, 2023
During development, we use overlapping domains:

- devthedocs.org
- build.devthedocs.org

Basically now the suspicious hostname checks are done after the public and external version domains have been tried, and before resolving a custom domain.

Closes #10241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants