mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 09:52:01 +08:00
DEV: Use relative URLs for theme_uploads_local (#17715)
Relative URLs will work just fine for Web Workers, which were the original reason for introducing the `theme_uploads_local` feature Making them relative will mean that `loadScript()` automatically uses the CDN (when enabled), which is doubly important because our CSP doesn't allow loading theme-javascripts from the host domain when the CDN is enabled.
This commit is contained in:
parent
a737195687
commit
c7dfb1c549
|
@ -12,7 +12,7 @@ class JavascriptCache < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def local_url
|
||||
"#{Discourse.base_url}#{path}"
|
||||
"#{Discourse.base_path}/#{path}"
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue
Block a user