Allow CORS backend option and fix frontend to allow it

This commit is contained in:
alonso.torres 2021-10-20 11:09:30 +02:00
parent f32f13069f
commit 007728819b
9 changed files with 80 additions and 18 deletions

View file

@ -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]