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

Closed
wants to merge 2 commits into from

3 participants

@teleological

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
Owner
cyu commented Dec 9, 2012

Merged. Thanks!

@cyu cyu closed this Dec 9, 2012
@andriytyurnikov

This one deserves version bump :)

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