From eb8c8f7c9e858d9aae92ba5aeeb3ac53918e7361 Mon Sep 17 00:00:00 2001 From: liuxiran Date: Mon, 24 Aug 2020 22:50:52 +0800 Subject: [PATCH 1/2] fix: fix dashboard /user/login get error code 405 --- compose/dashboard_conf/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compose/dashboard_conf/nginx.conf b/compose/dashboard_conf/nginx.conf index 3735dd8de2..8e729065d5 100644 --- a/compose/dashboard_conf/nginx.conf +++ b/compose/dashboard_conf/nginx.conf @@ -16,7 +16,8 @@ server { } location /apisix/admin { - proxy_pass http://manager:8080/apisix/admin; + proxy_pass http://192.17.5.15:8080/apisix/admin; } + error_page 405 =200 $uri; } From b43d19bb769731967ed653514b83001ab242626b Mon Sep 17 00:00:00 2001 From: liuxiran Date: Tue, 25 Aug 2020 11:41:10 +0800 Subject: [PATCH 2/2] fix: modify nginx according to giphoo proposal --- compose/dashboard_conf/nginx.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compose/dashboard_conf/nginx.conf b/compose/dashboard_conf/nginx.conf index 8e729065d5..497780d0b9 100644 --- a/compose/dashboard_conf/nginx.conf +++ b/compose/dashboard_conf/nginx.conf @@ -15,9 +15,15 @@ server { try_files $uri $uri/ /index.html; } + location /user/login { + if ( $request_method = 'POST' ) { #HERE + proxy_pass http://manager:8080; + } + try_files $uri $uri/ /index.html; + } + location /apisix/admin { - proxy_pass http://192.17.5.15:8080/apisix/admin; + proxy_pass http://manager:8080/apisix/admin; } - error_page 405 =200 $uri; }