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

Use only relative paths in studio URLs. #1675

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

docbacardi
Copy link
Contributor

What does this PR do?

Change absolute URLs in the studio to relative ones.

Motivation

Relative URLs in the studio eases the task to proxy multiple instances of ArcadeDB. Without this patch, URLs in the HTML and Javascript documents must be rewritten by the proxy. With this patch this is no longer necessary.

As an example the following nginx config snippet proxies 2 ArcadeDB instances:

        # This is the production instance.
        location /arcadedb/stable/ {
                rewrite ^/arcadedb/stable(.*)$ $1 break;
                proxy_pass http://10.11.12.13:2480;
        }
        # This is the sandbox server.
        location /arcadedb/sandbox/ {
                rewrite ^/arcadedb/sandbox(.*)$ $1 break;
                proxy_pass http://10.11.12.14:2480;
        }

Please note that the configuration example rewrites only the URL in the client's request. It does not change the URLs in the HTML and Javascript files sent by the ArcadeDB server.

Additional Notes

Unfortunately I'm too dumb to create a unit test for this. :(

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

@lvca lvca assigned lvca and docbacardi and unassigned lvca Jul 26, 2024
@lvca lvca self-requested a review July 26, 2024 22:33
@lvca lvca added the enhancement New feature or request label Jul 26, 2024
@lvca lvca added this to the 24.8.1 milestone Jul 26, 2024
@lvca lvca merged commit 73cae4c into ArcadeData:main Jul 26, 2024
6 of 7 checks passed
@lvca
Copy link
Contributor

lvca commented Jul 26, 2024

It looks good to me, thanks or your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants