Add support for and use socket host override. (#1682)

* Add support for and use socket host override. Closes #1378

* Fix embeds with the new websocket constructor
This commit is contained in:
Gabe Kangas
2022-03-06 17:11:51 -08:00
committed by GitHub
parent 9d5bdc320c
commit d24ddc2b0a
9 changed files with 75 additions and 82 deletions

View File

@@ -21,6 +21,7 @@ type webConfigResponse struct {
Tags []string `json:"tags"`
Version string `json:"version"`
NSFW bool `json:"nsfw"`
SocketHostOverride string `json:"socketHostOverride,omitempty"`
ExtraPageContent string `json:"extraPageContent"`
StreamTitle string `json:"streamTitle,omitempty"` // What's going on with the current stream
SocialHandles []models.SocialHandle `json:"socialHandles"`
@@ -78,6 +79,7 @@ func GetWebConfig(w http.ResponseWriter, r *http.Request) {
Tags: data.GetServerMetadataTags(),
Version: config.GetReleaseString(),
NSFW: data.GetNSFW(),
SocketHostOverride: data.GetWebsocketOverrideHost(),
ExtraPageContent: pageContent,
StreamTitle: data.GetStreamTitle(),
SocialHandles: socialHandles,