-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
serverURL with a base path does not work #24
Comments
Upon further investigation it appears that the issue may lie with the API URL, as the page at e.g. |
Hey @joshhills! This is actually not intended functionality, and there may be a way to do exactly what you’re looking to do with current functionality. Can you try setting your If this works for your needs, we will make sure to update the docs accordingly! |
Thanks for the quick reply! I think the info log message could be considered a bug given it ultimately points to a URL that doesn't work - perhaps an extra line in the docs section for hosting at a sub-path? I gave that a whirl and it worked. Do you know if there are other paths that need adjusting to ensure that no resources get hosted at the root? I can see options for API etc. in the routes block, but I also see a |
Totally. IMO we really just need to enforce that the The only routes that get mounted by Payload are the ones that you can customize through the The |
Yes, I think to be pedantic, "URL" can typically contain a path, so either a comment or splitting it into those individual fields (though that might be more boilerplate) should suffice. Support for a RE other routes - good to know! From reading the docs on uploads, I gather that I can ensure that media uploads are scoped accordingly by making the I'll try setting them all, creating a collection with file uploads, and close with a final comment when it works? |
Good point regarding pedantics. We will keep an eye out for further requests and should be able to facilitate I say we keep this issue open until we can do the following:
We can take a stab at that stuff tomorrow! |
Closed with #28 . |
This issue has been automatically locked. |
Bug Report
Setting the server URL to something with a path such as
http://localhost:3000/cms
Does not appear to work, despite printing:
[02:31:35] INFO (payload): Payload Admin URL: http://localhost:3000/cms/admin
Expected Behavior
You should be able to access the admin panel at the URL that is printed
Current Behavior
The route binding does not appear to factor in sub paths
Possible Solution
Use the provided serverURL when configuring express bindings in index.js
Steps to Reproduce
http://localhost:3000/foo
http://localhost:3000/foo/admin
Detailed Description
I am trying to do this because I have multiple containerized applications running in my environment - e.g.
Ideally, the front-end site will exist at the
/
root and the CMS will exist at/cms
(akin to Wordpress)The text was updated successfully, but these errors were encountered: