allow wildcard of the configured domain, too

This commit is contained in:
Henry 2021-04-16 16:57:50 +02:00
parent 4d329001fa
commit e14525f112
1 changed files with 9 additions and 1 deletions

View File

@ -299,7 +299,15 @@ func runroomsrv() error {
secureMiddleware := secure.New(secure.Options{
IsDevelopment: development,
AllowedHosts: []string{httpsDomain},
AllowedHosts: []string{
// the normal domain
httpsDomain,
// the domain but as a wildcard match with *. infront
`*\.` + strings.Replace(httpsDomain, ".", `\.`, -1),
},
// for the wildcard matching
AllowedHostsAreRegex: true,
// TLS stuff
SSLRedirect: true,