getgrav/grav

Uri should prefer port in HTTP_HOST and not take SERVER_PORT

Open

#1 999 ouverte le 27 avr. 2018

Voir sur GitHub
 (5 commentaires) (0 réactions) (0 assignés)PHP (1 409 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (15 491 stars)
Métriques de merge PR
 (Merge moyen 4j 13h) (8 PRs mergées en 30 j)

Description

I run Grav in a docker container and use a different port internally. Uris get messed up for me because I map the internal docker port to a different port on the host.

Grav removes (correct) port from HTTP_HOST: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L1138

And takes the (wrong) port from SERVER_PORT. https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L1144

Grav should take the port as the request was made, which is the port from HTTP_HOST.

Guide contributeur