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

Inline server middleware configuration #43

Open
gabriel-augusto opened this issue Apr 29, 2019 · 1 comment
Open

Inline server middleware configuration #43

gabriel-augusto opened this issue Apr 29, 2019 · 1 comment

Comments

@gabriel-augusto
Copy link
Contributor

Upperkut::Configuration class is requiring all server middlewares in an inline way at the @server_middlewares instance variable initialization

Maybe a better way is to implement the possibility to add middlewares across all workers as described in PR #42

We should be able to implement/expose something like this:

# config/initializers/upperkut.rb

Upperkut.configure do |config|
  config.server_middlewares.add(DataDog)
end
@nsoufr
Copy link

nsoufr commented Mar 26, 2020

From #42

Is not a better solution to require all these files in an inline way.

I think the better way is to implement the possibility to add middlewares across all workers. The way is implemented today, each worker has its own middleware stack.

We should be able to implement/expose something like this:

# config/initializers/upperkut.rb

Upperkut.configure do |config|
  config.server_middlewares.add(DataDog)
end

That means that for each worker we need to look globally for Middlewares and copy them to worker private middleware stack.

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

2 participants