-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
CachetV3.x seems to not use the value set in .env called APP_URL for creating URLs on the site itself.
It appears to just use whatever the HTTP-request Host:-header was at the time and then it creates HTML with absolute URLs to resources and other pages.
This messes with putting CachetV3.x behind a CDN, for example:
Normal visitors visit https://cachet.ourdomain.tld/, this points to the CDN company.
The CDN company scrapes our site from a dedicated URL https://cachet-origin.ourdomain.tld.
Now the site at https://cachet.ourdomain.tld/ (CDN) serves content that has links to the cachet-origin "internal" version, causing visitors to bypass the CDN and hit the origin server directly.
We found an option at the CDN company to force the Host:-header to something we want.
This fixes our immediate problem using CachetV3.x.
It would be really nice if CachetV3.x would use the APP_URL for URLs instead of the Host:-header,
or that there was an option to force the URL to be x.y.z, as i would have expected APP_URL to do. ;)
Thanks!