Onpremise: HTTPS reverse proxy giving a non-secure warning due to assets

Created on 13 Oct 2017  路  8Comments  路  Source: getsentry/onpremise

Only 2 assets are loaded over HTTP by default:

_static/1507896046/sentry/images/favicon.ico
_static/1507896046/sentry/images/icons/apple-touch-icon.png

image
Can those be set to https, without having to alter the source?

Most helpful comment

@CaptainHypertext it is very likely that your system.url-prefix setting has the http in it. Replacing that with an https version should resolve your issue.

All 8 comments

I have "fixed" it partially now by configuring Nginx to replace all http:// strings to https:// with sub_filter

proxy_set_header Accept-Encoding ""; # no compression allowed or next won't work
sub_filter 'http://'  'https://';
sub_filter_once off;

However the content of assets can still pose a problem. I still get warnings for the automatic ticker for example.

See
https://stackoverflow.com/questions/46809998/is-there-a-way-to-rewrite-static-files-assets-using-nginx

https://unix.stackexchange.com/questions/398418/why-do-not-all-occurrences-of-a-string-get-replaced-by-nginxs-sub-filter

@thomasmoors, thanks a lot man!

This is a problem for me right now. This really should be fixed, especially with browsers cracking down on this nowadays.

@CaptainHypertext it is very likely that your system.url-prefix setting has the http in it. Replacing that with an https version should resolve your issue.

@BYK is right, I forgot to update this topic, but it's just setting I missed an created a way too complex solution

@BYK Yes, it looks like you would be correct, but oddly enough, my url prefix was set to the https url. However the Root URL setting in my admin settings was set to http, and changing that fixed it. Are these the same settings? Does setting it in the app override the configuration?
Thanks

@CaptainHypertext - yes they are the same setting. Normally, when you set this via the config files, it should override the settings in the UI and disable that setting. Not sure what happened in your case.

Probably just me bumbling around with this setup. Thanks again!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WoLpH picture WoLpH  路  3Comments

multinerd picture multinerd  路  5Comments

marbon87 picture marbon87  路  5Comments

NullIsNot0 picture NullIsNot0  路  5Comments

dotconnor picture dotconnor  路  6Comments