You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2019/11/20 11:02:05 UTC
[incubator-apisix] branch master updated: bugfix: avoid a useless
redirect when access `/apisix/dashboard`. (#886)
This is an automated email from the ASF dual-hosted git repository.
wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 2c57621 bugfix: avoid a useless redirect when access `/apisix/dashboard`. (#886)
2c57621 is described below
commit 2c57621f23549f6f5fb46567e14e23b1ab2be0de
Author: YuanSheng Wang <me...@gmail.com>
AuthorDate: Wed Nov 20 19:01:59 2019 +0800
bugfix: avoid a useless redirect when access `/apisix/dashboard`. (#886)
---
bin/apisix | 14 +++++++++++++-
conf/nginx.conf | 6 ++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/bin/apisix b/bin/apisix
index 6cdaaf0..bde9135 100755
--- a/bin/apisix
+++ b/bin/apisix
@@ -234,7 +234,13 @@ http {
}
}
- location /apisix/dashboard {
+ location = /apisix/dashboard {
+ content_by_lua_block {
+ ngx.exec("/apisix/dashboard/")
+ }
+ }
+
+ location /apisix/dashboard/ {
index index.html;
{%if allow_admin then%}
{% for _, allow_ip in ipairs(allow_admin) do %}
@@ -298,6 +304,12 @@ http {
}
}
+ location = /apisix/dashboard {
+ content_by_lua_block {
+ ngx.exec("/apisix/dashboard/")
+ }
+ }
+
location /apisix/dashboard {
index index.html;
{%if allow_admin then%}
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 6c09ab2..6014bba 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -124,6 +124,12 @@ http {
}
}
+ location = /apisix/dashboard {
+ content_by_lua_block {
+ ngx.exec("/apisix/dashboard/")
+ }
+ }
+
location /apisix/dashboard {
index index.html;