ltt1987 opened a new issue #2219:
URL: https://github.com/apache/apisix-dashboard/issues/2219


   # Feature request
   
   当前如需反向代理到apisix dashboard,只能进行根目录的代理,如果指定 http://host/dashboard/ 
的二级目录进行代理,代理后dashboard 
中的静态资源路径、请求的api接口路径,均为根路径(src="/favicon.png")的引用,期望的地址应该是二级目录(src="/dashboard/favicon.png")地址。
   
   ## Describe the solution you'd like
   
   建议增加可指定子路径的功能,类似pgAdmin中,通过增加添加自定义Header X-Script-Name 来指定目录。
   
   ## Additional context
   
   > pgAdmin 实现方式的参考:If you wish to host pgAdmin under a subdirectory rather 
than on the root of the server, you must specify the location and set the 
X-Script-Name header which tells the pgAdmin container how to rewrite paths:
   
   ```
   server {
       listen 80;
       server_name _;
   
       location /pgadmin4/ {
           proxy_set_header X-Script-Name /pgadmin4;
           proxy_set_header Host $host;
           proxy_pass http://localhost:5050/;
           proxy_redirect off;
       }
   }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to