fuck-cors/README.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2016-04-17 19:59:10 +00:00
[![Build Status](https://travis-ci.org/yogsototh/fuck-cors.svg?branch=master)](https://travis-ci.org/yogsototh/fuck-cors)
2014-09-24 22:23:17 +00:00
# fuck-cors
A Clojure library designed to fuck CORS and open your API completely.
2014-09-26 14:00:31 +00:00
So all cross domain HTTP calls should works.
It should works with cookies too.
2014-09-24 22:23:17 +00:00
In which case should you use this library:
1. You don't have time to think and want something that just works.
2. You don't mind much about security.
3. You hate CORS but want to be able to make Ajax call Cross website.
## Why?
[Some Men Just Want to Watch the World Burn](http://knowyourmeme.com/memes/some-men-just-want-to-watch-the-world-burn)
## Usage
Add
2016-04-17 19:59:10 +00:00
[![Clojars Project](https://img.shields.io/clojars/v/fuck-cors.svg)](https://clojars.org/fuck-cors)
2014-09-24 22:23:17 +00:00
to your `project.clj`.
Then
~~~
(:require [fuck-cors.core :refer [wrap-open-cors])
~~~
And use `wrap-open-cors` as middleware.
2016-01-28 15:09:10 +00:00
Now you can make AJAX call from _any_ website.
2014-09-24 22:23:17 +00:00
2016-01-28 15:09:10 +00:00
Of course if you want more control over which website are able to call your API, you should not use this middleware.
2014-09-26 13:53:55 +00:00
2014-09-24 22:23:17 +00:00
## License
Copyright © 2014 Yann Esposito
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.