feat: take the client address from trusted proxies
This commit is contained in:
1 parent
d17477ba59
commit
729e5861f5
13 files changed
+205
-4
No files matched your search
@@ -53,6 +53,7 @@ services:
|
||||
environment:
|
||||
ALISTEN_PUBLIC_URL: https://${ALISTEN_DOMAIN}
|
||||
STORAGE_PUBLIC_URL: ${STORAGE_PUBLIC_URL}
|
||||
ALISTEN_TRUSTED_PROXIES: ${ALISTEN_TRUSTED_PROXIES:-172.31.250.0/24}
|
||||
networks:
|
||||
- backend
|
||||
- db
|
||||
@@ -115,6 +116,12 @@ services:
|
||||
networks:
|
||||
proxy:
|
||||
name: proxy
|
||||
# traefik 经这个网络转发请求,serve 默认信任这个网段传来的 X-Forwarded-For。与已有的 docker 网络冲突时改这里,并同步修改 ALISTEN_TRUSTED_PROXIES。
|
||||
# 网络已经存在时 docker compose 不会按这里改它的网段:proxy 网络不是这个网段时(比如由没有固定网段的旧版创建),
|
||||
# 先 down 停止服务,再 docker network rm proxy 删除这个网络,然后启动。
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.31.250.0/24
|
||||
backend:
|
||||
name: alisten-backend
|
||||
db:
|
||||
|
||||
Reference in new issue
Block a user