Parse Server Config Options In Azure

那年仲夏 提交于 2019-12-12 04:23:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!