-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow disabling addons on 404 pages #373
Conversation
It reads a META tag `readthedocs-http-status` to get the HTTP status code for the original request to the documentation URL. It uses this HTTP status code to decide if each of the addons should be enabled or not. Closes #371 Requires readthedocs/common#222
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Perhaps eventually we'll want to pass around a request
object instead of just the HTTP status, but let's just keep this in mind for now.
Hmm. Interesting... How could we inject the whole response/request object from CF? Could we pickle it somehow? If you have an idea, please open an issue explaining this so we can discuss/track it there Having these objects around would be useful for other stuff for sure. |
Not sure actually. I suppose if we find other users looking for other response attributes we can figure that out. I might just be thinking of a simple object we maintain to consolidate arguments we're passing around now, but I also don't have any other strong recommendations for other data we might need to pass around. |
Good point. I opened #376 to discuss/track this work. |
…ble-on-specific-http-status
It reads a META tag
readthedocs-http-status
to get the HTTP status code for the original request to the documentation URL.It uses this HTTP status code to decide if each of the addons should be enabled or not.