Closed austinrappa78 closed 2 years ago
The way services bind to URIs has changed from version 3.
You need to set the uri
option of the service parameter as follows:
# this allows mapping urls to mongodb resources, but the root URI is set by the plugins-args.mongo.uri parameter
mongo-mounts:
- what: "*"
where: /
static-resources-mounts:
- what: /www
where: /
welcome-file: index.html
secured: false
embedded: false
# this binds the MongoService to the root URI /api
plugins-args:
mongo:
uri: /api
Thanks, I don't see that documented anywhere or the documentation wasn't clear enough. https://restheart.org/docs/v4/upgrade-to-v4/ https://restheart.org/docs/v5/upgrade-to-v5/ https://restheart.org/docs/upgrade-to-v6/
When upgrading to v6 the static resource path now blocks any mongo-mounts within the same path.
Expected Behavior
With RESTHeart running:
Current Behavior
The website www.blahblahblah.com serves up static content from static-resources-mounts The website www.blahblahblah.com/api returns 404 errors
Context
Upgrading from v3 to v6 and this behavior has changed.
Environment
Assume the folder structure:
In the restheart.yml configuration file:
Steps to Reproduce
Make changes to restheart.yml. Use curl or postman.