Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CORS header to public resources (Fix #242) #452

Merged
merged 6 commits into from
Jan 9, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Ensure CORS conformity on /search endpoints
heyvito committed Jan 4, 2016
commit 1fcc7001a079535bbe42bdd697605ae90db1c8f9
3 changes: 2 additions & 1 deletion src/clojars/web/search.clj
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@

(defn json-search [search query]
(let [response {:status 200
:headers {"Content-Type" "application/json; charset=UTF-8"}}]
:headers {"Content-Type" "application/json; charset=UTF-8"
"Access-Control-Allow-Origin" "*"}}]
(try
(assoc response
:body (let [results (search/search search query 1)]