Separate admin and API URLs #12682
lukebennett
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is borderline feature vs bug.
At the moment there is a single URL that can be set in config,
serverURL
, which is then appended to with either the admin or API routes via thegetAdminURL
orgetAPIURL
helper methods.I've seen it stated elsewhere that it's fine to host the admin portal and the API separately, however the above limitation leads to issues doing this.
For example, when first splitting my environment out (
https://admin.xxx.com
andhttps://api.xxx.com
), I saw certain API requests within the admin portal fail whenserverURL
was set to the admin URL, I had to change it to the API URL for it to work. However, this means that any reference togetAdminURL()
is now incorrect as it references the same config option.We could therefore do with a second config option for the API that could default to
serverURL
when not set, and then make sure that this is used as appropriate across the app. There are probably also other ways it could be made easier to split the two environments out, such as improved docs.Beta Was this translation helpful? Give feedback.
All reactions