Skip to content

Commit

Permalink
Fix the WebRTC ICE Server config format (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
klejejs authored Sep 30, 2024
1 parent a003528 commit 5552c7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/services/webrtc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const webrtcHandler = async (

const stunDomain = getStunDomain(request.cf.country, request.cf.continent);

return new Response(JSON.stringify([{ urls: [stunDomain] }]), {
return new Response(JSON.stringify([{ urls: stunDomain }]), {
headers: {
"content-type": "application/json;charset=UTF-8",
"Access-Control-Allow-Origin": "*",
Expand Down
2 changes: 1 addition & 1 deletion tests/webrtc.handler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("WebRTC Handler", () => {
MockEvent.request.cf.continent = continent;
const response = await routeRequest(MockSentry, MockEvent);
const result = await response.json<Record<string, any>>();
expect(result).toEqual([{ urls: [expected] }]);
expect(result).toEqual([{ urls: expected }]);
});
}
});

0 comments on commit 5552c7a

Please sign in to comment.