@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])
where the interceptors
vector is pulled into the server config
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?
could it be a CORS issue?
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