Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare proxy adds trailing slash to base URL, API calls redirect every time #47

Open
walirt opened this issue Oct 21, 2024 · 0 comments

Comments

@walirt
Copy link

walirt commented Oct 21, 2024

image
20241021-174324
I think we should modify the following function to support URLs with a trailing slash

export function toUrl(path: string): string {
return get(ApiUrlStore) + path;
}

For example, it can be solved by URL object

export function toUrl(path: string): string {
	return new URL(path, get(ApiUrlStore)).href;
}
linux-fertxo added a commit to linux-fertxo/headscale-admin that referenced this issue Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant