Hi! On Wed, Apr 29, 2015 at 10:34:05AM -0700, Rob Willett wrote: > I tried this and some things didn't work.
Are you sure you've tried exact example from my email? > This one appears to work ... > < HTTP/1.1 204 No Content > < Date: Wed, 29 Apr 2015 17:29:45 GMT > < Content-Length: 0 > < Connection: keep-alive > * Server Mojolicious (Perl) is not blacklisted > < Server: Mojolicious (Perl) > < Content-Type: text/html;charset=UTF-8 > < > * Connection #0 to host 127.0.0.1 left intact No, it doesn't. Here is how it should looks like when it really works (check extra headers in reply; cors.pl is exact copy&paste from my email): $ perl cors.pl daemon [Wed Apr 29 20:50:23 2015] [info] Listening at "http://*:3000" Server available at http://127.0.0.1:3000 [Wed Apr 29 20:50:25 2015] [debug] OPTIONS "/data" [Wed Apr 29 20:50:25 2015] [debug] Routing to a callback [Wed Apr 29 20:50:25 2015] [debug] 204 No Content (0.000650s, 1538.462/s) $ curl -v -X OPTIONS -H 'Origin: site.tld' -H 'Access-Control-Request-Method: POST' http://127.0.0.1:3000/data * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0) > OPTIONS /data HTTP/1.1 > Host: 127.0.0.1:3000 > User-Agent: curl/7.42.0 > Accept: */* > Origin: site.tld > Access-Control-Request-Method: POST > < HTTP/1.1 204 No Content < Date: Wed, 29 Apr 2015 17:50:25 GMT < Access-Control-Max-Age: 1728000 < Content-Length: 0 < Access-Control-Allow-Methods: POST < Connection: keep-alive < Vary: Origin < Access-Control-Allow-Origin: site.tld < Server: Mojolicious (Perl) < Content-Type: text/html;charset=UTF-8 < * Connection #0 to host 127.0.0.1 left intact -- WBR, Alex. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
