Skip to content

Fix #267#1070

Closed
D-Walter wants to merge 1 commit intobinary-husky:masterfrom
D-Walter:patch-1
Closed

Fix #267#1070
D-Walter wants to merge 1 commit intobinary-husky:masterfrom
D-Walter:patch-1

Conversation

@D-Walter
Copy link

修复反代使用二级地址无法正确获取静态资源导致的一系列问题

修复反代使用二级地址无法正确获取静态资源导致的一系列问题
@binary-husky
Copy link
Owner

gradio-app/gradio#4352
和之前的pr是不是出发点有区别

image

@binary-husky
Copy link
Owner

这个可能很多人会误解,我觉得可以加到wiki里面或者readme里面

@D-Walter
Copy link
Author

D-Walter commented Sep 1, 2023

gradio-app/gradio#4352 和之前的pr是不是出发点有区别

image

这个pr是针对反代的,这个root_path不影响直接访问
如果服务器地址为192.168.1.1,服务暴露在9999端口,并且nginx反代到/gpt-academic
那么访问http://192.168.1.1:9999http://192.168.1.1/gpt-academic都可以正常访问

这个pr就可以需要反代的人把root_path改成非\就自动生效,而无需额外修改main.py的任何内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants