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

Add dynamic prefix path detection for client initialization #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

william-dandrea
Copy link

The goal of this PR is to allow the users to use URLs with prefix.

What this code does :

  • Extract prefix path from the current window location.
  • Append the detected prefix path to the base endpoint for client initialization.

For example, if your playground URL is "http://localhost:3000/myPrefix/playground", the Client requests will take into consideration this prefix.

Of course, if any prefix are present, the Client URL will be the base one.

I created this PR because we have this use case for one of our project.

Thanks a lot :)

- Extract prefix path from the current window location.
- Append the detected prefix path to the base endpoint for client initialization.
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

Successfully merging this pull request may close these issues.

1 participant