Skip to content
Snippets Groups Projects
Commit 061d2a87 authored by Florian Bieringer's avatar Florian Bieringer
Browse files

Remove patch

parent 53cd504e
No related branches found
No related tags found
No related merge requests found
......@@ -17,10 +17,6 @@ ENV APACHE_DOCUMENT_ROOT /var/www/studip/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Patch proxy url problem
COPY proxy_url.patch /tmp/proxy_url.patch
RUN cd /var/www/studip/ && svn patch /tmp/proxy_url.patch
# Add custom entrypoint
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod u+x /usr/local/bin/docker-entrypoint.sh
......
Index: studip/lib/classes/Request.class.php
===================================================================
--- studip/lib/classes/Request.class.php (revision 40367)
+++ studip/lib/classes/Request.class.php (working copy)
@@ -96,6 +96,12 @@
*/
public static function protocol()
{
+
+ // If a reverse proxy tells us the required protocol we should respect that
+ if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
+ return $_SERVER['HTTP_X_FORWARDED_PROTO'];
+ }
+
return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
? 'https'
: 'http';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment