A Resource path can be specified as exact string match (/path/to/file.txt) or with a '*' wildcard (/all/files/in/*). To include all of a directory's files and the files in its subdirectories, use this form: /assets/*/. A resource can take the following options:
However, Rack::Cors::Resource#compile will turn the string "/assets/**/*" into the regex /^#{"/assets/(.*?)(.*?)/(.*?)"}$/ which does not match "/assets/some-file.whatever".
It's unclear to me if maybe there was a path globbing lib in the past, or if the docs were always wrong, but maybe the docs should be changed to suggest "/assets/*" instead.
The README states:
However,
Rack::Cors::Resource#compile
will turn the string"/assets/**/*"
into the regex/^#{"/assets/(.*?)(.*?)/(.*?)"}$/
which does not match"/assets/some-file.whatever"
.It's unclear to me if maybe there was a path globbing lib in the past, or if the docs were always wrong, but maybe the docs should be changed to suggest
"/assets/*"
instead.