Menu

Post image 1
Post image 2
1 / 2
0

One Playwright Header Broke Every WebSocket Test

DEV Community·Forrest Miller·21 days ago
#NOjbUKWU
#why#webdev#testing#browser#test#request
Reading 0:00
15s threshold

The failing tests looked like an Ably outage. Every multiplayer browser test on BingWow started timing out at the same gate: "wait until the realtime channel attaches." The app loaded. The room existed. The players joined. Then the WebSocket layer never became ready. The root cause was not Ably. It was one Playwright config line. extraHTTPHeaders : { ' X-BingWow-Automated ' : ' 1 ' , } Enter fullscreen mode Exit fullscreen mode That header was supposed to mark test traffic as internal. Instead, it leaked to every cross-origin request the browser made. Why this broke realtime Playwright's extraHTTPHeaders is global for the browser context. It does not apply only to requests headed for your app. It applies to third-party calls too. In this app, a multiplayer room talks to: bingwow.com for HTML and API routes Ably for realtime channels Supabase for auth and storage paths analytics endpoints for product events The custom X-BingWow-Automated header is not CORS-safelisted.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More