Provide basePath support (#309)
* Provide basePath support To be able to serve the application via a reverse proxy in a subfolder smarty needs to be aware of the basepath if any. * Provide basepath support via X-Forwarded headers * Fix warnings * Review adjustments * Provide support X-Forwarded-Host header * Use $uri in view factory directly * Use middleware to set basepath from X-Forwarded-Path header * Fix invalid type hint in RouterPathMiddleware * Add "X-Forwarded-Host" to README
This commit is contained in:
parent
234ecc2c6d
commit
c5298dd24b
4 changed files with 71 additions and 2 deletions
|
@ -76,6 +76,12 @@ You will need PHP 7.2 (or higher) and the following PHP modules:
|
|||
|
||||
## Web server configuration
|
||||
|
||||
If you want to serve the application under a basepath and/or with a different internal than external port (scenario: nginx->docker setup) Alltube supports the following X-Forwarded headers:
|
||||
|
||||
* X-Forwarded-Host (ex. `another.domain.com`)
|
||||
* X-Forwarded-Path (ex: `/alltube`)
|
||||
* X-Forwarded-Port (ex: `5555`)
|
||||
|
||||
### Apache
|
||||
|
||||
The following modules are recommended:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue