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

Feature request: Create a wrapper to assign a layer to several calls #6

Open
lagartoverde opened this issue Sep 30, 2020 · 0 comments

Comments

@lagartoverde
Copy link

Currently you can only add a layer to a call manually and one by one like

match "/assets/*path", %{ layer: :static } do
  forward conn, path, "http://frontend/assets/"
end

get "/index.html", %{ layer: :static } do
  forward conn, [], "http://frontend/index.html"
end

We are aiming to allow the following syntax

in_layer :static do

  match "/assets/*path" do
    forward conn, path, "http://frontend/assets/"
  end

  get "/index.html" do
    forward conn, [], "http://frontend/index.html"
  end

end

Resulting in less repetition and a much cleaner code

@madnificent madnificent changed the title Hacktoberfest 2020 - Create a wrapper to assign a layer to several calls Feature request: Create a wrapper to assign a layer to several calls May 26, 2021
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