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

Add autoproxy feature

parent 1a98d080
No related branches found
No related tags found
No related merge requests found
...@@ -36,4 +36,10 @@ namespace { ...@@ -36,4 +36,10 @@ namespace {
$ASSETS_URL = $PROXY_URL.'/assets/'; $ASSETS_URL = $PROXY_URL.'/assets/';
unset($PROXY_URL); unset($PROXY_URL);
} }
// Use autoproxy
if (getenv('AUTO_PROXY')) {
$ABSOLUTE_URI_STUDIP = $_SERVER['HTTP_X_FORWARDED_PROTO'].'://'.$_SERVER['HTTP_X_FORWARDED_HOST'].'/';
$ASSETS_URL = $ABSOLUTE_URI_STUDIP.'/assets/';
}
} }
\ No newline at end of file
...@@ -28,8 +28,9 @@ services: ...@@ -28,8 +28,9 @@ services:
# Use automigrate to migrate your instance on startup # Use automigrate to migrate your instance on startup
# AUTO_MIGRATE: 1 # AUTO_MIGRATE: 1
# Use proxy url if run behind a proxy # Use proxy url OR autoproxy if run behind a proxy
# PROXY_URL: https://studip.example.com/ # PROXY_URL: https://studip.example.com/
# AUTO_PROXY: 1
volumes: volumes:
db_data: {} db_data: {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment