mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
feat: add and adjust configs for Web embed mode (#7766)
* feat: add and adjust configs for embed mode * Update services/web/pkg/config/options.go Co-authored-by: Martin <github@diemattels.at> * docs: adjust description for WEB_OPTION_EMBED_TARGET --------- Co-authored-by: Martin <github@diemattels.at>
This commit is contained in:
@@ -117,6 +117,7 @@ func DefaultConfig() *config.Config {
|
||||
AccountEditLink: &config.AccountEditLink{},
|
||||
Editor: &config.Editor{},
|
||||
FeedbackLink: &config.FeedbackLink{},
|
||||
Embed: &config.Embed{},
|
||||
Routing: config.Routing{
|
||||
IDBased: true,
|
||||
},
|
||||
@@ -197,4 +198,10 @@ func Sanitize(cfg *config.Config) {
|
||||
if cfg.Web.Config.Options.Upload.XHR.Timeout == 0 && cfg.Web.Config.Options.Upload.CompanionURL == "" {
|
||||
cfg.Web.Config.Options.Upload = nil
|
||||
}
|
||||
// remove Embed parent if no value is set
|
||||
if cfg.Web.Config.Options.Embed.Enabled == "" &&
|
||||
cfg.Web.Config.Options.Embed.Target == "" &&
|
||||
cfg.Web.Config.Options.Embed.MessagesOrigin == "" {
|
||||
cfg.Web.Config.Options.Embed = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user