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

[PA-997] Add after action callback to handle the conn #4

Merged
merged 2 commits into from
May 24, 2023

Conversation

spyrbri
Copy link

@spyrbri spyrbri commented May 5, 2023

Adds the ability to run after_send callbacks.

This helps to add headers to the final response via the Brother Gateway.

Also, update some dependencies to allow this to be used by more updated applications.

@spyrbri spyrbri requested a review from a team as a code owner May 5, 2023 09:55
@spyrbri spyrbri force-pushed the PA-997-handle-brother-gateway-CSRF branch 4 times, most recently from d75621a to 412b4c7 Compare May 12, 2023 07:54
@spyrbri spyrbri force-pushed the PA-997-handle-brother-gateway-CSRF branch from 8b4d197 to 23cc8a5 Compare May 23, 2023 15:43
@spyrbri spyrbri self-assigned this May 23, 2023
@spyrbri spyrbri force-pushed the PA-997-handle-brother-gateway-CSRF branch from 23cc8a5 to fc6dd4b Compare May 23, 2023 15:46
Comment on lines -3 to -10

adapter =
case System.get_env("COWBOY_VERSION") do
"1" <> _ -> Plug.Adapters.Cowboy
_ -> Plug.Adapters.Cowboy2
end

{:ok, _} = adapter.http(mod, [], conf)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the latest update of Cowboy, Cowboy2 is always used.

@spyrbri spyrbri merged commit 6cd1c71 into master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants