Only intercept preflight requests for fonts, and bonus insert_target configuration option#18
Only intercept preflight requests for fonts, and bonus insert_target configuration option#18snikch wants to merge 7 commits intoericallam:masterfrom
insert_target configuration option#18Conversation
Don't assume this is the only middleware handling preflights.
|
+1 |
|
Could you expand this PR to include some specs to demonstrate the features working? To run the specs all you have to do is |
|
+1 Could use some merging |
|
Still looking for specs to prove this works before merging. |
There was a problem hiding this comment.
defined?(ActionDispatch::Static) never returns false, even if serve_static_assets is false. This should probably check for its presence in app.middleware instead.
|
+1, please merge -- this gem's current behavior of responding to any preflight request is really confusing. |
|
@dmur and @sandeep45, I can't merge this PR until there are specs proving this functionality works. It would be irresponsible of me to just merge in some code that is untested. |
|
@ericallam Understood. I'm not a rails guy by trade or I'd write the specs myself. |
Sorry this is a two in one
Rack::Corsor any other setup that also requires special preflight responsesinsert_targetoption so that you can choose which middleware you wantfont_assetsto be inserted before