在Azure中解析服务器配置选项 [英] Parse Server Config Options In Azure
问题描述
我已经在Azure中安装了parse.com服务器.一切都与初始设置配合良好.
I've installed a parse.com server in Azure. All is working well with the initial setup.
我现在想使用解析服务器Github"页面上注释的一些高级选项"来锁定服务器.
I now want to lock down the server with a few of the "Advanced Options" as annotated on the Parse Server Github page.
我了解我在以下Azure的应用程序设置"中进行这些操作:
I understand that I do these in the App Settings in Azure a la the below:
即,在服务器重新启动后sessionLength应该可见吗?但是,情况并非如此,因为我仍然可以为新登录的用户获得1年的课程.我是否错误地填写了详细信息,Azure&解析服务器,还是我这样做完全错误?
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?
推荐答案
我不确定是否应为SESSION_LENGTH
.您需要检查以查看其在index.js
中的构造方式.
Im not sure if it should be SESSION_LENGTH
. You would need to check to see how its constructed in the index.js
.
更新:
您可以尝试编辑配置文件并传递额外的参数,例如:
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
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.
这篇关于在Azure中解析服务器配置选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!