Skip to content
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

[Request] 配置文件增加反代资源路径选项 #330

Open
yi-shiyu opened this issue Jul 22, 2024 · 2 comments
Open

[Request] 配置文件增加反代资源路径选项 #330

yi-shiyu opened this issue Jul 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yi-shiyu
Copy link

🥰 需求描述

通过nginx路径进行反代,结果html上面引用静态资源/static/css/是绝对路径,没有走到反代路径导致404

🧐 解决方案

增加反代路径选项

📝 补充信息

No response

@yi-shiyu yi-shiyu added the enhancement New feature or request label Jul 22, 2024
@zdz
Copy link
Owner

zdz commented Jul 31, 2024

nginx rewrite

@anylones
Copy link

anylones commented Aug 1, 2024

转发静态文件试试
location ~ .*.(js|css|png)$
{
proxy_pass http://127.0.0.1:8080;
expires 30d;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants