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

建议Casdoor的Endpoint区分内外部访问 #603

Closed
chung1912 opened this issue Oct 9, 2024 · 1 comment
Closed

建议Casdoor的Endpoint区分内外部访问 #603

chung1912 opened this issue Oct 9, 2024 · 1 comment
Labels
casdoor This issue is related to the Casdoor enhancement New feature or request

Comments

@chung1912
Copy link

chung1912 commented Oct 9, 2024

目前casdoor的参数Endpoint是内外部访问共用,即点击sso登录时,浏览器跳转的地址是Endpoint,容器内部(nginx ui后台)访问casdoor服务器也是Endpoint,这导致一些部署场景出现问题,例如:
当docker-compose部署采用非桥接模式时,浏览器需要访问192.168.1.5:8000进入casdoor的登录页面,但是容器内部无法访问192.168.1.5:8000,因此会连接超时;如果Endpoint采用casdoor的hostname或者casdoor容器的ip(例如172.88.0.2),容器内部可以casdoor,但是浏览器是不能访问;
目前解决的方案,是nginx ui必须部署为桥接网络,这造成了部署的限制

建议Endpoint区分为两个环境变量,例如新增一个NGINX_UI_CASDOOR_URL环境变量,该变量为点击“sso登录”时,浏览器跳转至casdoor的网页的base_url;原来的NGINX_UI_CASDOOR_ENDPOINT只用于容器内部(nginx ui后台)访问casdoor服务器

@chung1912 chung1912 added the enhancement New feature or request label Oct 9, 2024
@Hintay Hintay added the casdoor This issue is related to the Casdoor label Nov 5, 2024
0xJacky added a commit that referenced this issue Dec 15, 2024
@0xJacky
Copy link
Owner

0xJacky commented Dec 15, 2024

已在 835349c 中添加,将会在 v2.0.0-beta.42 中发布。

@0xJacky 0xJacky closed this as completed Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
casdoor This issue is related to the Casdoor enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants