You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that the discord proxy supports targets with a custom port in the URL Mappings (confirmed it works), I have decided to file this issue again.
The current implementation of patchUrlMappings produces the following result when a client app served from 1234.discordsays.com tries making a request to 86d96a.edge.hathora.dev:51738 with a parameter matched port in the target:
Expected result: Client app makes a request to 1234.discordsays.com/hathora/edge/86d96a/51738 instead of 86d96a.edge.hathora.dev:51738
Actual result: An error occurs on client app on load (Uncaught TypeError: Failed to construct 'URL': Invalid URL atmatchAndRewriteURL)
This error occurs because the line at https://github.com/discord/embedded-app-sdk/blob/main/src/utils/url.ts#L36 attempts to construct a new URL with the target value. However, if the target value has a non-numeric port (like the parameter matched :{port} from the example) then the URL constructor will fail.
The text was updated successfully, but these errors were encountered:
Now that the discord proxy supports targets with a custom port in the URL Mappings (confirmed it works), I have decided to file this issue again.
The current implementation of
patchUrlMappings
produces the following result when a client app served from1234.discordsays.com
tries making a request to86d96a.edge.hathora.dev:51738
with a parameter matched port in the target:Expected result: Client app makes a request to
1234.discordsays.com/hathora/edge/86d96a/51738
instead of86d96a.edge.hathora.dev:51738
Actual result: An error occurs on client app on load (
Uncaught TypeError: Failed to construct 'URL': Invalid URL at
matchAndRewriteURL)This error occurs because the line at https://github.com/discord/embedded-app-sdk/blob/main/src/utils/url.ts#L36 attempts to construct a
new URL
with the target value. However, if the target value has a non-numeric port (like the parameter matched:{port}
from the example) then theURL
constructor will fail.The text was updated successfully, but these errors were encountered: