I wanted to configure MongoDB 6.x for rest. Now Ive read that you need to use directives. I tried to configure it with https://www.mongodb.com/docs/manual/reference/expansion-directives/#std-label-expansion-directives.
I have the following configuration:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
#start
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
# engine:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 28017
bindIp: 127.0.0.1
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#security:
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
__rest: "http://mongoconf.example.net:28017/test"
type: "string"
trim: "whitespace"
digest: "<string>"
digest_key: "<string>"`
Now I get the following error message: digest: "Not a valid, even length hex string"
Tried the configuration described "Expansion Directives Reference" at https://www.mongodb.com/docs/manual/reference/expansion-directives/#std-label-expansion-directives