allow wildcard of the configured domain, too
This commit is contained in:
parent
4d329001fa
commit
e14525f112
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue