这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@danielgtaylor
Copy link
Owner

Small documentation fix - you cannot set headers after the body has already been written. A more advanced middleware could capture the body in memory before setting a header, but that is beyond the scope of this example.

Fixes #355.

@danielgtaylor danielgtaylor marked this pull request as ready for review April 8, 2024 04:36
@danielgtaylor danielgtaylor merged commit 6247e82 into main Apr 8, 2024
@danielgtaylor danielgtaylor deleted the fix-middleware-header-example branch April 8, 2024 04:39
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

Successfully merging this pull request may close these issues.

Router-agnostic middleware example does not set response header as expected

2 participants