问题
I've installed a parse.com server in Azure. All is working well with the initial setup.
I now want to lock down the server with a few of the "Advanced Options" as annotated on the Parse Server Github page.
I understand that I do these in the App Settings in Azure a la the below:
Namely, sessionLength should be visible following a server restart? However this is not the case as I still get 1 year sessions for newly logged in users. Am I filling in the details incorrectly, is there an error with Azure & Parse Server, or am I doing this completely wrong?
回答1:
Im not sure if it should be SESSION_LENGTH
. You would need to check to see how its constructed in the index.js
.
Update:
You could try Edit the config file and pass extra params like this:
sessionLength : process.env.SESSION_LENGTH || 31536000 //Set to what you need
enableAnonymousUsers : process.env.ENABLE_ANON_USERS || false,
allowClientClassCreation: process.env.CLIENT_CLASS_CREATION || false,
github.com/mamaso/parse-server-azure-config
Look at the ENV variables listed : https://github.com/ParsePlatform/parse-server/blob/master/src/cli/definitions/parse-server.js
OR
Alternative you could update the session value on log-in or signup via a cloud code function.
来源:https://stackoverflow.com/questions/41840552/parse-server-config-options-in-azure