New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce mounting cascade apps #1471
Conversation
Perhaps, rack-protection is the cause of problem. |
Thanks for the tip! I updated the bundle on my machine and got this failure. So, The last successful Travis build was with rack-protection 1.5.0 https://travis-ci.org/padrino/padrino-framework/jobs/12674078#L274 |
Looks great! |
Would this cascade to the next app if the first explicitly returns 404? That may not be desired(maybe an edge case). e.g. route is matched in app #1 but 404 is returned. |
Well, that's how cascading is defined in Rack http://rack.rubyforge.org/doc/classes/Rack/Cascade.html |
got it, just wondering. |
I guess, it won't hurt to add configurable status code. On it. |
You can configure HTTP codes for cascade apps like this: config/apps.rb:
In this case the request will pass |
This looks very good @ujifgc 👍! :) |
👍 |
Introduce mounting cascade apps
Awesome, nice work @ujifgc. Padrino 0.12.0 is coming along fast with all your guys great contributions. Only 22 open issues. Great work @padrino/core-members! |
More info at #796
Router will traverse through apps in mount order.
If app mount path matches the request and the app returns 404, router will call next app with matching mount path.
If no apps with matching path return non-404 response, router will return the 404 of the last app.
Update: configure cascade codes: #1471 (comment)