Ticket #1271 (new enhancement) — at Version 2
CORS support
Reported by: | rgrp | Owned by: | rgrp |
---|---|---|---|
Priority: | major | Milestone: | ckan-sprint-2011-10-28 |
Component: | ckan | Keywords: | |
Cc: | Repository: | ckan | |
Theme: | none |
Description (last modified by rgrp) (diff)
CORS - http://www.w3.org/TR/cors/ - support.
This is what you do in Apache. Should do this in lib/base.py or similar.
Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, PUT, GET, OPTIONS" Header always set Access-Control-Allow-Headers "X-CKAN-API-KEY, Content-Type" # Respond to all OPTIONS requests with 200 OK # This could be done in the webapp # This is need for pre-flighted requests (POSTs/PUTs) RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L]
Change History
Note: See
TracTickets for help on using
tickets.