map->CorsPolicy enforces correctness of input, this way the wrap-cors functions doesn't need to validate data. Probably we can add a call to map->CorsPolicy as the first thing of wrap-cors function and keep this function private.
Thanks for the suggestion. On Tuesday, November 25, 2014 5:27:12 PM UTC-8, James Reeves wrote: > > I mentioned this on r/clojure, but don't understand why you have a > map->CorsPolicy function, as it doesn't appear to serve any purpose. You > seem to be using it as a map, but in Clojure it's more idiomatic to use > maps as maps. > > - James > > On 25 November 2014 at 23:40, <ro...@unbounce.com <javascript:>> wrote: > >> It is our pleasure to announce a new ring middleware for CORS support. >> >> https://github.com/unbounce/encors >> >> Features include: >> >> * Add multiple CORS Policy to an app (can classify them via ring request >> info) >> >> * Preflight CORS requests are supported >> >> * Thoroughly tested (around 276 different assertions in both unit and >> integration tests) >> >> * Validated API options via Prismatic's schema >> >> * Full documentation on README >> >> Any feedback is welcome. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com >> <javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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.