mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
feat: add external url for casdoor #603
This commit is contained in:
parent
6f9046485b
commit
835349c33f
5 changed files with 27 additions and 10 deletions
|
@ -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": "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue