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
fix: handle jwt messages correctly in daf-url in browser environments
I was sending through a message with a JWT in the raw and my agent running in the browser has in the MessageHandler chain `daf-url` active.
I ran into errors because `const parsed = parse(message.raw, true)` returned an URL object with the URL of the page. The URL came out as http://localhost:3000/jwthere. Which of course did not resolve to something dad could understand.
After some digging, I found the following in the `url-parse` documentation
> Note that when `url-parse` is used in a browser environment, it will default to
using the browser's current window location as the base URL when parsing all
inputs. To parse an input independently of the browser's current URL (e.g. for
functionality parity with the library in a Node environment), pass an empty
location object as the second parameter. (https://github.com/unshiftio/url-parse/pull/65/files)
This commit adds the {} parameter.
0 commit comments