readthedocs.org
b3c26c86 - Proxito: refactor middleware (#9933)

Commit
3 years ago
Proxito: refactor middleware (#9933) For the new implementation we are still going to need to set the proper `RTD*` headers at the middleware level, or having access to some of this information from all views. This means re-using the response from the unresolve_domain method. Later we could attach this to the request as a dataclass or something. We were duplicating some logic from the resolver in order to know why the resolver failed, instead of doing that, let's just return exceptions. We were also having access to the project object itself from the unresolver, just to return the slug and then again fetch the project from the database, so instead we are returning the project now.
Author
Parents
Loading