Concrete 5 behind proxy (SSL and Plain)
Permalink
Hi,
I notice that URLs in CSS files with theme packages are made absolute
So for pacakges/theme_mytheme/themes/mytheme/main.css:
becomes...
This is fine, and great that concrete5 sorts out the site like this, however my site runs behind a proxy which may (or may not) perform SSL termination.
I.e. a user can browse tohttp://www.example.com ORhttp://www.example.com and it will be reverse proxied to the instance of nginx where the concrete5 site is running.
Unfortunatly, when browsing with https:// is used, the URL rewritten in the CSS still points to http://
This is understandable, the request has been made from the proxy to the backend using plain http.
But how can I instruct concrete5 to use https:// as the protocol scheme for rewrites when the original request is https://
I have many header options at my disposal - but not idea where to add some conditional code?
Many thanks
Rob
I notice that URLs in CSS files with theme packages are made absolute
So for pacakges/theme_mytheme/themes/mytheme/main.css:
#container { background: url(images/page-bg.jpg) repeat-x top; }
becomes...
#container { background: url(http://www.example.com/packages/theme_elavation/themes/elavation/images/page-bg.jpg) repeat-x top; }
This is fine, and great that concrete5 sorts out the site like this, however my site runs behind a proxy which may (or may not) perform SSL termination.
I.e. a user can browse tohttp://www.example.com ORhttp://www.example.com and it will be reverse proxied to the instance of nginx where the concrete5 site is running.
Unfortunatly, when browsing with https:// is used, the URL rewritten in the CSS still points to http://
This is understandable, the request has been made from the proxy to the backend using plain http.
But how can I instruct concrete5 to use https:// as the protocol scheme for rewrites when the original request is https://
I have many header options at my disposal - but not idea where to add some conditional code?
Many thanks
Rob