Skip to content

Commit

Permalink
fix(http-server): remove empty headers object
Browse files Browse the repository at this point in the history
Bun is throwing an error saying that 'headers' must be an object, which it already is. Removing the declaration seems to be fixing the error.
  • Loading branch information
wallpants committed Sep 6, 2024
1 parent b1f286a commit dbae32c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/server/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ const mockCssLoader: BunPlugin = {

export function httpHandler(app: GithubPreview) {
return async (req: Request, server: Server) => {
const upgradedToWs = server.upgrade(req, {
data: {}, // this data is available in socket.data
headers: {},
});
const upgradedToWs = server.upgrade(req);
if (upgradedToWs) {
// If client (browser) requested to upgrade connection to websocket
// and we successfully upgraded request
Expand Down

0 comments on commit dbae32c

Please sign in to comment.