snipe-it/app
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
..
Console Merge pull request #12124 from Godmartinz/feature/sc-16946/add-checkbox-to-allow-skipping-a-user-during 2023-02-21 20:10:46 -08:00
Events Adopt Laravel coding style 2021-06-10 20:15:52 +00:00
Exceptions Make early-boot errors (syntax, others) be more easy-to-read 2023-02-15 11:31:13 -08:00
Helpers adds AgeFormatter, not working yet 2022-11-29 09:51:42 -08:00
Http Add Reverse Proxy support to Pre-Flight URL check 2023-03-05 18:15:16 +01:00
Importer Adjust the date format for purchase_date field 2023-02-24 10:59:31 -06:00
Jobs
LegacyEncrypter Minor code cleanup bits and bobs (#6805) 2019-03-13 20:12:03 -07:00
Listeners try/catch wrap notifications on checkin/checkout 2022-09-15 13:18:42 -07:00
Models Merge branch 'develop' into features/make_eol_sortable 2023-02-28 18:05:09 -08:00
Notifications Merge pull request #12422 from marcusmoore/fix/adhere-to-email-alerts-setting 2023-02-15 18:46:08 -08:00
Observers Remove old cache key for settings 2023-01-09 16:19:25 -08:00
Policies Fixed license policy method 2022-09-16 14:06:46 -07:00
Presenters Merge branch 'develop' into features/make_eol_sortable 2023-02-28 18:05:09 -08:00
Providers Register the consumables.files ability 2023-01-17 17:15:23 -08:00
Services Made constant DATA_SESSION_KEY public 2023-02-06 12:40:32 -08:00