-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sub_path support when dashboard under a subdirectory via nginx reverse proxy. #2219
Comments
Not sure if it's supported with Apache APISIX 🤔 @tzssangglass could you please have a check? |
BTW, @ltt1987 I recommend using English here 😄 For we have many contributors and users who speak English and other languages 😄 |
Sorry for that, I'm not good at english. I have added English content, but I still keep Chinese in order to avoid wrong description. |
got it, @bzp2010 would you please take a look? |
we cau use |
I don't think |
APISIX does not modify the url by default. |
Hi, @ltt1987. I think the problem is that the compilation product of our dashboard project currently uses absolute paths to load resources, so you need to recompile if you want to proxy dashboard in a subdirectory. These are not directly supported by either the Manager API or the Of course, we can take some measures to improve it, if you are willing to try. Here are the configures about it. apisix-dashboard/web/config/config.ts Lines 48 to 49 in d7b7722
|
Got it! Thanks! |
Feature request
当前如需反向代理到apisix dashboard,只能进行根目录的代理,如果指定 http://host/dashboard/ 的二级目录进行代理,代理后dashboard 中的静态资源路径、请求的api接口路径,均为根路径(src="/favicon.png")的引用,期望的地址应该是二级目录(src="/dashboard/favicon.png")地址。
Currently, if you need to reverse proxy to apisix-dashboard, Only support the root directory proxy.
If you set apisix-dashboard under a subdirectory via nginx reverse proxy like http://ip/dashboard/, you will get some errors due to the wrong resource path. E.g:
src="/favicon.png"
is wrong,src="/dashboard/favicon.png"
is correct.Describe the solution you'd like
建议增加可指定子路径的功能,类似pgAdmin中,通过增加添加自定义Header X-Script-Name 来指定目录。
It is recommended to add the function of specifying sub-path, For example, in pgAdmin, specify the directory by adding a custom Header X-Script-Name.
Additional context
The text was updated successfully, but these errors were encountered: