https://github.com/r0man/ring-cors
Ring middleware for Cross-Origin Resource Sharing.
https://github.com/r0man/ring-cors
Last synced: 9 months ago
JSON representation
Ring middleware for Cross-Origin Resource Sharing.
- Host: GitHub
- URL: https://github.com/r0man/ring-cors
- Owner: r0man
- Created: 2011-03-04T15:43:34.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T21:48:35.000Z (about 6 years ago)
- Last Synced: 2025-04-13T05:06:55.300Z (9 months ago)
- Language: Clojure
- Homepage: http://github.com/r0man/ring-cors
- Size: 58.6 KB
- Stars: 173
- Watchers: 6
- Forks: 45
- Open Issues: 11
-
Metadata Files:
- Readme: README.org
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
* Ring CORS
[[https://clojars.org/ring-cors][https://img.shields.io/clojars/v/ring-cors.svg]]
[[https://travis-ci.org/r0man/ring-cors][https://travis-ci.org/r0man/ring-cors.svg]]
[[http://jarkeeper.com/r0man/ring-cors][http://jarkeeper.com/r0man/ring-cors/status.svg]]
[[http://jarkeeper.com/r0man/ring-cors][https://jarkeeper.com/r0man/ring-cors/downloads.svg]]
[[https://github.com/ring-clojure][Ring]] middleware for [[https://en.wikipedia.org/wiki/Cross-origin_resource_sharing][Cross-Origin Resource Sharing]].
** Usage
#+BEGIN_SRC clojure
(require '[ring.middleware.cors :refer [wrap-cors]])
(def handler
(wrap-cors my-routes :access-control-allow-origin [#"http://example.com"]
:access-control-allow-methods [:get :put :post :delete]))
#+END_SRC
** License
Copyright (C) 2013-2016 r0man
Distributed under the Eclipse Public License, the same as Clojure.