From 71a6a38253f3d5b7f90a68c3ff7ee9f40ecfdc0d Mon Sep 17 00:00:00 2001 From: Yann Esposito Date: Mon, 27 Oct 2014 10:37:49 +0100 Subject: [PATCH] added some headers --- project.clj | 2 +- src/fuck_cors/core.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index dc7eb31..010c623 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject fuck-cors "0.1.0" +(defproject fuck-cors "0.1.2" :description "Fuck CORS and open all to everyone" :url "http://github.com/yogsototh/fuck-cors" :license {:name "MIT" diff --git a/src/fuck_cors/core.clj b/src/fuck_cors/core.clj index 3ff544b..db2f3b8 100644 --- a/src/fuck_cors/core.clj +++ b/src/fuck_cors/core.clj @@ -23,10 +23,10 @@ referer host) headers {"Access-Control-Allow-Origin" origins - "Access-Control-Allow-Headers" "Origin, X-Requested-With, Content-Type, Accept, Cache-Control" + "Access-Control-Allow-Headers" "Origin, X-Requested-With, Content-Type, Accept, Cache-Control, Authorization" "Access-Control-Allow-Methods" "HEAD, GET, POST, PUT, DELETE, OPTIONS, TRACE" "Access-Control-Allow-Credentials" "true" "Access-Control-Expose-Headers" "content-length" - "Vary" "Accept-Encoding, Origin"}] + "Vary" "Accept-Encoding, Origin, Accept-Language"}] (-> (handler request) (update-in [:headers] #(into % headers))))))