Skip to content
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

Document when matchers without a layer are matched #13

Open
abeforgit opened this issue Mar 9, 2024 · 0 comments
Open

Document when matchers without a layer are matched #13

abeforgit opened this issue Mar 9, 2024 · 0 comments

Comments

@abeforgit
Copy link

I assume it's either before all other layers, or after all other layers :)
Would be handy to have in the readme which one it is.

E.g.:

defmodule Dispatcher do
  use Matcher



   define_layers [ :api_services, :api, :frontend, :not_found ]

  match "/path" do
    forward conn, path, "http://foo/"
  end

  match "/path", %{ layer: :api } do
    forward conn, path, "http://bar/"
  end
end

will a request to /path be forwarded to foo, or to bar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant