legacy url rewrite support

This commit is contained in:
Ulf Gebhardt 2022-01-08 05:44:04 +01:00
parent 571e737fe5
commit 32930677b9
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
3 changed files with 14 additions and 1 deletions

View File

@ -1,8 +1,8 @@
NGINX_SSL=false
NGINX_SERVER_NAME=_
#Example data
#NGINX_REWRITE_LEGACY_URLS=true
#NGINX_SSL=true
#NGINX_SERVER_NAME=stage1.gradido.net
#NGINX_SSL_CERTIFICATE=/etc/letsencrypt/live/stage1.gradido.net/fullchain.pem

View File

@ -65,6 +65,13 @@ server {
proxy_redirect off;
}
# Legacy URLS
set REWRITE_LEGACY_URLS = $NGINX_REWRITE_LEGACY_URLS;
if( $REWRITE_LEGACY_URLS = 'true' ){
rewrite ^/vue$1 /$1 permanent;
}
# TODO this could be a performance optimization
#location /vue {
# alias /var/www/html/gradido/frontend/dist;

View File

@ -50,6 +50,12 @@ server {
proxy_redirect off;
}
# Legacy URLS
set REWRITE_LEGACY_URLS = $NGINX_REWRITE_LEGACY_URLS;
if( $REWRITE_LEGACY_URLS = 'true' ){
rewrite ^/vue$1 /$1 permanent;
}
# TODO this could be a performance optimization
#location /vue {
# alias /var/www/html/gradido/frontend/dist;