Introduce an env variable for the session cookie path#2573
Introduce an env variable for the session cookie path#2573ssddanbrown merged 1 commit intoBookStackApp:masterfrom
Conversation
|
Hi @ckleemann, Would you be able to technically explain what this enables you to do or achieve? From what I can understand, modification of this option would make the system more restricted and work against your example use case. |
|
Hi @ssddanbrown, sure: In our setup we run several apps under the same domain. e.g. In our setup the different apps are run by different teams. Most of the apps are based on Django and Python. In the case of a bug Django sends a email with the stacktrace and the cookies received to the developers. The list of cookies send by the browser for a user is quite long. It might contain information which are not required to see for the team running this app. By setting the cookie path correctly we are able to reduce the number of cookies. In the result only cookies needed are send to each app. I think there is not much complexity added: If you do not know how to set the cookie path you simply use the default value. This also makes the change backwards compatible. But if you have a need to set the cookie path the change allows you to do so without getting in trouble on the next update. Some background: |
|
Thanks for explaining this further @ckleemann. I've made some further changes to the implementation in 1420f23. Instead of this being an additional option that's set this will instead be automatic based on the set This will be part of the next feature release. |
The session cookie path parameter can not configured by an env file. There are scenarios where you want to set the cookie path e.g. multi App Setups under the same domain. With this PR a new env variable
SESSION_COOKIE_PATHis introduced.