Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
9a72025a
Unverified
Commit
9a72025a
authored
Apr 09, 2026
by
Wesley Liddick
Committed by
GitHub
Apr 09, 2026
Browse files
Merge pull request #1523 from octo-patch/fix/issue-1519-home-content-csp-frame-src
fix: include home_content URL in CSP frame-src origins
parents
74302f60
ce833d91
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/setting_service.go
View file @
9a72025a
...
...
@@ -355,8 +355,8 @@ func safeRawJSONArray(raw string) json.RawMessage {
return
json
.
RawMessage
(
"[]"
)
}
// GetFrameSrcOrigins returns deduplicated http(s) origins from
purchase_subscription_url
// and all custom_menu_items URLs. Used by the router layer for CSP frame-src injection.
// GetFrameSrcOrigins returns deduplicated http(s) origins from
home_content URL,
//
purchase_subscription_url,
and all custom_menu_items URLs. Used by the router layer for CSP frame-src injection.
func
(
s
*
SettingService
)
GetFrameSrcOrigins
(
ctx
context
.
Context
)
([]
string
,
error
)
{
settings
,
err
:=
s
.
GetPublicSettings
(
ctx
)
if
err
!=
nil
{
...
...
@@ -375,6 +375,9 @@ func (s *SettingService) GetFrameSrcOrigins(ctx context.Context) ([]string, erro
}
}
// home content URL (when home_content is set to a URL for iframe embedding)
addOrigin
(
settings
.
HomeContent
)
// purchase subscription URL
if
settings
.
PurchaseSubscriptionEnabled
{
addOrigin
(
settings
.
PurchaseSubscriptionURL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment