ericallam / font_assets

Helps with serving font assets with Rails 3.1
137 stars 79 forks source link

Remove options http method interception #45

Open alexanderfrankel opened 9 years ago

alexanderfrankel commented 9 years ago

Explicitly returning a 200 response code when env["REQUEST_METHOD"] == OPTIONS can introduce a dependency in the order an application's middleware is executed.

Specifically, if a different intended response for an OPTIONS request is implemented (like a 405) in another piece of middleware, it MUST come before font_assets middleware in the stack or it will never get executed.

Happy to discuss further : ) and apologies if I am missing the reason why this OPTIONS request interception if necessary for font_assets to work properly. Please enlighten! Thanks!

alexanderfrankel commented 9 years ago

Looks like this could be a dup of https://github.com/ericallam/font_assets/pull/18.

I can probably help out with some specs if needed. Also, if the interception is needed, can you please explain. Thanks!