We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da991de commit b66afccCopy full SHA for b66afcc
src/lib/parse-url.ts
@@ -13,6 +13,11 @@ export interface InternalUrl {
13
14
export default function parseUrl(url?: string): InternalUrl {
15
const defaultUrl = new URL("http://localhost:3000/api/auth")
16
+
17
+ if (url && !url.startsWith("http")) {
18
+ url = `https://${url}`
19
+ }
20
21
const _url = new URL(url ?? defaultUrl)
22
const path = (_url.pathname === "/" ? defaultUrl.pathname : _url.pathname)
23
// Remove trailing slash
0 commit comments