Skip to content
Browse files

Allow cross origin requests access to Count and Link headers

  • Loading branch information...
1 parent f06eaa2 commit d6d44f479196dffee7d3014ebccb7484e8c5c463 Jesse Stuart committed Dec 21, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/tentd/api.rb
  2. +1 −1 lib/tentd/api/router/cors_headers.rb
View
2 lib/tentd/api.rb
@@ -42,7 +42,7 @@ def action(env)
headers = {
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Methods' => 'GET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS',
- 'Access-Control-Allow-Headers' => 'Content-Type, Authorization',
+ 'Access-Control-Allow-Headers' => 'Content-Type, Authorization, Count, Link',
'Access-Control-Max-Age' => '2592000' # 30 days
}
[200, headers, []]
View
2 lib/tentd/api/router/cors_headers.rb
@@ -10,7 +10,7 @@ def call(env)
status, headers, body = @app.call(env)
headers.merge!(
'Access-Control-Allow-Origin' => '*',
- 'Access-Control-Allow-Headers' => 'Content-Type, Authorization',
+ 'Access-Control-Allow-Headers' => 'Content-Type, Authorization, Count, Link',
) if env['HTTP_ORIGIN']
[status, headers, body]
end

0 comments on commit d6d44f4

Please sign in to comment.
Something went wrong with that request. Please try again.