mirror of
https://github.com/komari-monitor/komari.git
synced 2025-11-11 17:35:40 +00:00
26 lines
630 B
Go
26 lines
630 B
Go
package api
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/komari-monitor/komari/database/config"
|
|
)
|
|
|
|
func GetPublicSettings(c *gin.Context) {
|
|
cst, err := config.Get()
|
|
if err != nil {
|
|
RespondError(c, 500, err.Error())
|
|
return
|
|
}
|
|
// Return public settings including CORS
|
|
RespondSuccess(c, gin.H{
|
|
"sitename": cst.Sitename,
|
|
"description": cst.Description,
|
|
"custom_head": cst.CustomHead,
|
|
"custom_body": cst.CustomBody,
|
|
"oauth_enable": cst.OAuthEnabled,
|
|
"disable_password_login": cst.DisablePasswordLogin,
|
|
"allow_cors": cst.AllowCors,
|
|
})
|
|
|
|
}
|