We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When (before|after)_all filter is specified for all paths (no argument) then any subsequent all filters are called ignoring path matching argument.
(before|after)_all
require "kemal" before_all do |env| puts "Filter for all requests" end before_all "/xxx/*" do |env| puts "Filtering /xxx requests" end before_all "/yyy/*" do |env| puts "Filtering /yyy requests" end get "/*" do |env| puts "REQ: #{env.request.path}" end Kemal.run
Expected behavior:
Request GET /xxx/123 should output:
Filter for all requests Filtering /xxx requests REQ: /xxx/123
Actual behavior:
Request GET /xxx/123 outputs:
Filter for all requests Filtering /xxx requests Filtering /yyy requests REQ: /xxx/123
Reproduces how often: ALWAYS
Crystal 1.11.2 (2024-01-18) LLVM: 17.0.6 Default target: aarch64-apple-darwin23.4.0
kemal version 1.5.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When
(before|after)_all
filter is specified for all paths (no argument) then any subsequent all filters are called ignoring path matching argument.Steps to Reproduce
Expected behavior:
Request GET /xxx/123 should output:
Actual behavior:
Request GET /xxx/123 outputs:
Reproduces how often: ALWAYS
Versions
Crystal 1.11.2 (2024-01-18)
LLVM: 17.0.6
Default target: aarch64-apple-darwin23.4.0
kemal version 1.5.0
The text was updated successfully, but these errors were encountered: