mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Обновлены роуты в соответствие с тем, как они в итоге будут прописаны в документации
В nginx добавлена конфигурация, отвечающая за проксирование сессионных запросов со старого домена Версия nginx обновлена с 1.9 до 1.11 В тестах сессионного сервера больше не используется генерация url
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM nginx:1.9
|
||||
FROM nginx:1.11
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY account.ely.by.conf.template /etc/nginx/conf.d/account.ely.by.conf.template
|
||||
|
@@ -4,7 +4,6 @@ server {
|
||||
set $root_path '/var/www/html';
|
||||
set $api_path '${root_path}/api/web';
|
||||
set $frontend_path '${root_path}/frontend/dist';
|
||||
set $authserver_host '${AUTHSERVER_HOST}';
|
||||
|
||||
root $root_path;
|
||||
charset utf-8;
|
||||
@@ -12,15 +11,19 @@ server {
|
||||
etag on;
|
||||
|
||||
set $request_url $request_uri;
|
||||
if ($host = $authserver_host) {
|
||||
set $host_with_uri '${host}${request_uri}';
|
||||
|
||||
if ($host_with_uri ~* '^${AUTHSERVER_HOST}/auth') {
|
||||
set $request_url '/api/authserver${request_uri}';
|
||||
rewrite ^/auth /api/authserver$uri last;
|
||||
}
|
||||
|
||||
if ($host_with_uri ~* '^${AUTHSERVER_HOST}/session') {
|
||||
set $request_url '/api/minecraft${request_uri}';
|
||||
rewrite ^/session /api/minecraft$uri last;
|
||||
}
|
||||
|
||||
location / {
|
||||
if ($host = $authserver_host) {
|
||||
rewrite ^ /api/authserver$uri last;
|
||||
}
|
||||
|
||||
alias $frontend_path;
|
||||
index index.html;
|
||||
try_files $uri /index.html =404;
|
||||
|
Reference in New Issue
Block a user