mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-03 10:27:01 +00:00
fix: always add public url to allowed cors origins
This fixes a bug where it was not possible to do anything because the public url was not allowed by default for CORS requests.
Regression from 433b8b9115
Resolves https://github.com/go-vikunja/vikunja/issues/916
This commit is contained in:
@@ -599,6 +599,9 @@ func InitConfig() {
|
||||
if DefaultSettingsTimezone.GetString() == "" {
|
||||
DefaultSettingsTimezone.Set(ServiceTimeZone.GetString())
|
||||
}
|
||||
|
||||
publicURL := strings.TrimSuffix(ServicePublicURL.GetString(), "/")
|
||||
CorsOrigins.Set(append(CorsOrigins.GetStringSlice(), publicURL))
|
||||
}
|
||||
|
||||
func random(length int) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user