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

Raise 404 at SubdomainMiddleware if the project does not exist. #4795

Conversation

@dojutsu-user
Copy link
Member

@dojutsu-user dojutsu-user commented Oct 23, 2018

Fixes #3801

@codecov
Copy link

@codecov codecov bot commented Oct 23, 2018

Codecov Report

Merging #4795 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4795      +/-   ##
==========================================
+ Coverage    75.3%   75.31%   +<.01%     
==========================================
  Files         158      158              
  Lines       10047    10049       +2     
  Branches     1267     1268       +1     
==========================================
+ Hits         7566     7568       +2     
  Misses       2145     2145              
  Partials      336      336
Impacted Files Coverage Δ
readthedocs/core/middleware.py 84.55% <100%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cef5bc4...acb4070. Read the comment docs.

@dojutsu-user
Copy link
Member Author

@dojutsu-user dojutsu-user commented Oct 23, 2018

@humitos I have implemented this with the .exists() as discussed in the comment #3801 (comment) and also added the tests for code coverage.
Please review.

Copy link
Member

@ericholscher ericholscher left a comment

Makes sense. This should only really be happening on 404's already (since docs will be served directly from nginx if they exist) -- but seems like a useful sanity check.

@ericholscher ericholscher merged commit adde923 into readthedocs:master Nov 1, 2018
3 checks passed
@dojutsu-user dojutsu-user deleted the raise-404-at-subdomain-middleware branch Dec 12, 2018
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