Skip to content

Commit

Permalink
Send allow header in SSE module as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Dec 12, 2024
1 parent edc050b commit 47912da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/ServerSentEvents/Handler/EventSourceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public EventSourceHandler(Func<IRequest, string?, ValueTask<bool>>? inspector, F
{
if (request.Method.KnownMethod != RequestMethod.Get)
{
throw new ProviderException(ResponseStatus.MethodNotAllowed, "Server Sent Events require a GET request to establish a connection");
throw new ProviderException(ResponseStatus.MethodNotAllowed, "Server Sent Events require a GET request to establish a connection", (b) => b.Header("Allow", "GET"));
}

request.Headers.TryGetValue("Last-Event-ID", out var lastId);
Expand Down

0 comments on commit 47912da

Please sign in to comment.