snipe-it/app/Http
Manuel Rodríguez Guimeráns 548ae7ad22 Add Reverse Proxy support to Pre-Flight URL check
Before this change, the Pre-Flight URL check would inevitably fail
whenever Snipe-IT was running behind a reverse proxy or load balancer.

The URL check tries to ensure that the configured application URL
matches the URL that is actually used to reach the application. However,
when running behind an HTTP intermediary (like a reverse proxy or a load
balancer) the HTTP connection that Snipe-IT receives is not the _real_
connection from the user anymore, but a connection from the HTTP
intermediary. The scheme, host and port that Snipe-IT would obtain from
that incoming intermediary connection wouldn't match what is configured
as application URL and, therefore, the URL check would fail.

This commit solves the situation by making Snipe-IT's Pre-Flight URL
check aware of the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP
headers. These headers represent the _de-facto_ standard used by reverse
proxies and other HTTP intermediary components to convey information
about the incoming HTTP connection to the upstream application. Being
the upstream application, Snipe-IT can then make use of this information
to correctly evaluate the validity of the configured application URL.
2023-03-05 18:15:16 +01:00
..
Controllers Add Reverse Proxy support to Pre-Flight URL check 2023-03-05 18:15:16 +01:00
Livewire allows users to clear their slack settings 2023-02-16 08:43:12 -08:00
Middleware Remove unused import 2023-02-22 12:34:56 -08:00
Requests Merge pull request #12446 from Godmartinz/livewire_slack_inputs 2023-02-15 13:27:07 -08:00
Traits Added a validation to use the same name in categories with different types 2021-10-08 15:19:16 -05:00
Transformers Added location clone 2023-03-01 13:51:35 -08:00
Kernel.php Log user out of other devices when they change their password 2022-08-25 12:24:26 -07:00