Yep, I tried a non-liberator POST, and it went through perfectly. So right 
now it seems like liberator is doing something wonky to my 
requests/responses.

On Friday, October 14, 2016 at 8:22:29 PM UTC+8, Kenny Liu wrote:
>
> Anyone know if this all works out of the box? Preflight OPTIONS is 200 but 
> the GET/POST fails. My attempt to get it working:
>
> (def app
>   "Order must be reversed. See: http://stackoverflow.com/q/19455801/894091
> "
>   (-> (bidi/make-handler v1-routes)
>       (wrap-defaults api-defaults)
>       (wrap-cors :access-control-allow-origin [#".*"]
>                  :access-control-allow-headers ["Host"
>                                                 "User-Agent"
>                                                 "Accept"
>                                                 "Accept-Language"
>                                                 "Accept-Encoding"
>                                                 "Content-Type"
>                                                 "Referer"
>                                                 "Content-Length"
>                                                 "Origin"
>                                                 "Connection"
>                                                 "Pragma"
>                                                 "Cache-Control"]
>                  :access-control-allow-methods [:get :put :post :delete
> ])))
>
> http://stackoverflow.com/q/39789487/894091
>
> Based on https://github.com/clojure-liberator/liberator/issues/76, I 
> suspect it might be liberator messing with something. I'm pretty stumped.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to