Skip to content

Commit

Permalink
fix: double-slash in api calls due to domain to url conversion (#48)
Browse files Browse the repository at this point in the history
skymoth sends //api/v1/apps to my server, which is not correctly handled by either my reverse proxy or GoToSocial.
  • Loading branch information
untitaker authored Nov 26, 2024
1 parent 0259c4f commit 75a422d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function fetchImageToBytes(url: string) {
}

export function domainToUrl(domain: string) {
return `https://${domain}/`
return `https://${domain}`
}

export function genCallBackUrl(instanceDomain: string) {
Expand Down Expand Up @@ -86,4 +86,4 @@ export function checkValidHttpsUrl(rwaUrl: string): boolean {
} catch (err) {
return false;
}
}
}

0 comments on commit 75a422d

Please sign in to comment.