This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-31
Channels
- # aws (1)
- # beginners (70)
- # boot (12)
- # calva (45)
- # cider (45)
- # clara (1)
- # cljdoc (10)
- # cljs-dev (133)
- # clojure (315)
- # clojure-dev (2)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (1)
- # clojure-spec (23)
- # clojure-uk (19)
- # clojurescript (48)
- # cursive (11)
- # data-science (5)
- # datomic (18)
- # figwheel-main (3)
- # fulcro (18)
- # graphql (14)
- # jackdaw (1)
- # juxt (1)
- # kaocha (1)
- # off-topic (10)
- # other-languages (3)
- # pathom (2)
- # pedestal (7)
- # re-frame (23)
- # reagent (1)
- # reitit (4)
- # ring-swagger (12)
- # rum (4)
- # shadow-cljs (26)
- # specter (6)
- # speculative (12)
- # tools-deps (44)
- # vim (8)
- # yada (2)
@donaldball you could also set interceptors at the server config level with the key :io.pedestal.http/interceptors
with a vector of common interceptors, if that factoring works for your setup
so my routes looks like this:
(def routes
#{["/custom/notes" :get [auth owner `notes/filter-by-user]]
["/custom/notes" :post [auth-un any-user `notes/create-one]]
["/custom/notes/:id" :get [auth owner `notes/read-one]]
["/custom/notes/:id" :patch [auth-un owner `notes/update-one]]
["/custom/notes/:id/graphic" :get [auth owner `notes/read-graphic]]
["/custom/notes/:id/production-file" :post [auth owner `notes/create-production-file]]
["/custom/health_check" :get `healthy]})
(def interceptors
[(multipart-params)
(body-params)
json-body
authorization
exception-handler])
I'm trying to access my pedestal service from my web app but the preflight OPTIONS request returns a 404. A GET request to the same url works. I haven't had this issue before when using pedestal in the past. Any ideas what silly little thing I'm missing is?
Actually yeah. I need to provide ::http/allowed-origins
I thought it wouldn't be an issue as I'm hosting pedestal on the same domain. But it looks like it won't deal with preflight at all if it doesn't have that key