You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
我使用v1.11.3版本的镜像把archery部署在pod里。然后外部配置了一个反向代理(没有使用镜像内自带的nginx)把流量转发的archery的pod,然后通过浏览器打开,一直被重定向(302)
我的反向代理配置如下:
location /archery/ {
proxy_pass http://archery-service:9123;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
浏览器访问https://myhost/archery
服务端日志如下:
[11/Sep/2024 10:41:50] "GET /archery/ HTTP/1.0" 302 0
直接访问https://myhost/archery/login仍然重定向,服务日志如下:
[11/Sep/2024 10:42:19] "GET /archery/login/ HTTP/1.0" 302 0
然后修改archery/settings.py,增加了FORCE_SCRIPT_NAME = '/archery',并把STATIC_URL设置为 '/archery/static/',重启服务后还是同样重定向
再修改archery/urls.py,所有path都加了一个archery/的前缀,重启服务后还是同样重定向。
Beta Was this translation helpful? Give feedback.
All reactions