feat: add external url for casdoor #603

This commit is contained in:
Jacky 2024-12-15 16:54:30 +08:00
parent 6f9046485b
commit 835349c33f
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
5 changed files with 27 additions and 10 deletions

View file

@ -87,11 +87,16 @@ func CasdoorCallback(c *gin.Context) {
}
func GetCasdoorUri(c *gin.Context) {
endpoint := settings.CasdoorSettings.Endpoint
clientId := settings.CasdoorSettings.ClientId
redirectUri := settings.CasdoorSettings.RedirectUri
state := settings.CasdoorSettings.Application
endpoint := settings.CasdoorSettings.Endpoint
// feature request #603
if settings.CasdoorSettings.ExternalUrl != "" {
endpoint = settings.CasdoorSettings.ExternalUrl
}
if endpoint == "" || clientId == "" || redirectUri == "" || state == "" {
c.JSON(http.StatusOK, gin.H{
"uri": "",