This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-02
Channels
- # announcements (2)
- # beginners (32)
- # boot (10)
- # calva (81)
- # cider (39)
- # clojure (56)
- # clojure-europe (8)
- # clojure-italy (7)
- # clojure-new-zealand (1)
- # clojure-nl (8)
- # clojure-poland (1)
- # clojure-spec (12)
- # clojure-uk (38)
- # clojurescript (5)
- # community-development (1)
- # core-async (55)
- # cursive (3)
- # datomic (44)
- # dirac (15)
- # emacs (20)
- # events (1)
- # fulcro (57)
- # hyperfiddle (2)
- # jobs (9)
- # juxt (9)
- # kaocha (1)
- # lein-figwheel (1)
- # off-topic (93)
- # pathom (2)
- # pedestal (3)
- # planck (3)
- # reitit (15)
- # ring (10)
- # shadow-cljs (25)
- # spacemacs (7)
- # sql (19)
- # tools-deps (8)
Personally I am thinking about it because of CORS purpose, but on the other hand maybe it is better to implement it in the app. Not sure.
I know we have https://github.com/r0man/ring-cors but it just doesn’t work for me. Nothing is happening.
(wrap-cors :access-control-allow-origin [#""]
:access-control-allow-headers ["Content-Type" "User-Agent"]
:access-control-allow-methods [:options :get :post])
curl -v -i -H "Origin: " -X DELETE Tue Apr 2 16:23:06 2019
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to dev.localhost (127.0.0.1) port 8080 (#0)
> DELETE /authorize HTTP/1.1
> Host: dev.localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> Origin:
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Set-Cookie: auth-session=4594d762-8b71-42ed-bdb1-a27575410196;Path=/;HttpOnly
Set-Cookie: auth-session=4594d762-8b71-42ed-bdb1-a27575410196;Path=/;HttpOnly
< Content-Length: 3
Content-Length: 3
< Server: http-kit
Server: http-kit
< Date: Tue, 02 Apr 2019 14:23:33 GMT
Date: Tue, 02 Apr 2019 14:23:33 GMT
<
* Connection #0 to host dev.localhost left intact
foo⏎
(ring.middleware.cors/allow-request? {:headers {"origin" ""}
:request-method :options}
{:access-control-allow-origin [#""]
;:access-control-allow-headers #{"Content-Type" "User-Agent"}
:access-control-allow-methods #{:options :get :post}
})
return false hmmoh I see, it looks like ring-cors use forbidden header access-control-request-method