mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
✨ Allow CORS backend option and fix frontend to allow it
This commit is contained in:
parent
f32f13069f
commit
007728819b
9 changed files with 80 additions and 18 deletions
|
@ -93,7 +93,8 @@
|
|||
(when (false? registration)
|
||||
(swap! flags disj :registration)))
|
||||
|
||||
(def public-uri
|
||||
(defn get-public-uri
|
||||
[]
|
||||
(let [uri (u/uri (or (obj/get global "penpotPublicURI")
|
||||
(.-origin ^js location)))]
|
||||
;; Ensure that the path always ends with "/"; this ensures that
|
||||
|
@ -102,6 +103,8 @@
|
|||
(not (str/ends-with? (:path uri) "/"))
|
||||
(update :path #(str % "/")))))
|
||||
|
||||
(def public-uri (get-public-uri))
|
||||
|
||||
;; --- Helper Functions
|
||||
|
||||
(defn ^boolean check-browser? [candidate]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue