-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links not always HTTPS behind off-loaded SSL (AWS) #1827
Comments
Simply gets the URI object. Maybe we should take into account https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L745-L765 and here: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L61-L66 Similar to what we do for IP: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Uri.php#L745-L765 |
Modified Build scheme and Build port functions to take into account those in SSL offloading situations.
Will this fix be released soon? My sitemap also includes only http links, while my website is only accessible via https. This doesn't work with Google webmasters indexing. |
is there a reason this isn't released yet? |
I'm a bit confused because this was merged ages ago! https://github.com/getgrav/grav/pull/1888/files But it seems it got lost when merging with Grav 1.4 branch: 7aa930c#diff-07d65c25e3a3440248e54057e22c6456 I'll have to manually merge it back in again now as Uri has changed significantly |
Fixed again in develop for 1.4.6 release |
Thank you rhukster! @CSixtyFour no more manual patching for you! :) |
I've got a site SSL offloaded on AWS. I've found some links such as in the sitemap plugin are not showing as HTTPS even though force_ssl is on in the admin panel and url rewriting is happening in htaccess. It looks like links generated using something like
$uri = $this->grav['uri'];
( sitemap plugin ) don't show https.This is my first time diving into Grav core but I think there are two things here:
force_ssl is happening to high up for direct access to
uri
so therefore in this situation this option is irrelevant in this use case.In
uri.php
I think the two important environmental variables are $_SERVER['REQUEST_SCHEME'] and $_SERVER['SERVER_PORT'] both of which would be http / 80 behind an SSL offloader but probably accurate in a "normal" environment.I have done some messy hacking for my setup but maybe $_SERVER['HTTP_X_FORWARDED_PORT'] and $_SERVER['HTTP_X_FORWARDED_PROTO] could be an override option for SSL offloading?
The text was updated successfully, but these errors were encountered: