Support "file://" as configurable origin #11

wants to merge 2 commits into from

3 participants


rack-cors converts a "null" (string) HTTP_ORIGIN, representing a CORS request originating from a filesystem-loaded page, into "file://", but it is not currently possible to configure such requests to be allowed for non-public resources because origin "file://" is interpreted as "http://file://" and the "file://" response header value is not interpreted by the browser as equivalent to "null". This patch enables the configuration of "file://" as an origin and maps "file://" back to "null" when setting the "Access-Control-Allow-Origin" header.

@cyu cyu was assigned Dec 9, 2012
cyu commented Dec 9, 2012

Merged. Thanks!

@cyu cyu closed this Dec 9, 2012

This one deserves version bump :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment