mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 04:11:39 +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
|
@ -7,6 +7,8 @@
|
|||
(ns app.worker.thumbnails
|
||||
(:require
|
||||
["react-dom/server" :as rds]
|
||||
[app.common.uri :as u]
|
||||
[app.config :as cfg]
|
||||
[app.main.exports :as exports]
|
||||
[app.main.fonts :as fonts]
|
||||
[app.util.http :as http]
|
||||
|
@ -29,11 +31,15 @@
|
|||
|
||||
(defn- request-page
|
||||
[file-id page-id]
|
||||
(let [uri "/api/rpc/query/page"]
|
||||
(let [uri (u/join (cfg/get-public-uri) "api/rpc/query/page")
|
||||
params {:file-id file-id
|
||||
:id page-id
|
||||
:strip-thumbnails true}]
|
||||
(->> (http/send!
|
||||
{:uri uri
|
||||
:query {:file-id file-id :id page-id :strip-thumbnails true}
|
||||
:method :get})
|
||||
{:method :get
|
||||
:uri uri
|
||||
:credentials "include"
|
||||
:query params})
|
||||
(rx/map http/conditional-decode-transit)
|
||||
(rx/mapcat handle-response))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue