Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve coexistence with other django-apps on the same host by setting *_COOKIE_PATH #10639

Closed
prauscher opened this issue Oct 13, 2022 · 2 comments · Fixed by #10706
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@prauscher
Copy link
Contributor

NetBox version

v3.2.4

Feature type

New functionality

Proposed functionality

While netbox provides one configuration option to specify a different BASE_PATH, It does not set the CSRF_COOKIE_PATH, LANGUAGE_COOKIE_PATH or SESSION_COOKIE_PATH. All Values could be set directly to BASE_PATH or "/", as BASE_PATH already contains a trailing slash or empty string.

Use case

Improve coexistence with other Django-based-projects hosted on the same host. While this can (and probably should) also be achieved by using different cookie-names, setting the path of these cookies probably decreases confusion.

Database changes

None

External dependencies

None

@prauscher prauscher added the type: feature Introduction of new functionality to the application label Oct 13, 2022
@tyler-8
Copy link
Contributor

tyler-8 commented Oct 14, 2022

I think NetBox has reached the point where it should set NetBox-specific defaults, rather than using Django defaults, for all of these types of settings. This would be a separate FR of course. This would reduce conflicts for all users, and also allow users to further customize if they needed to.

Related:

@prauscher
Copy link
Contributor Author

If you like I can provide a PR to set *_COOKIE_PATH to an appropriate value based on BASE_PATH, but I need an accepted issue first

@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Oct 19, 2022
prauscher added a commit to prauscher/netbox that referenced this issue Oct 20, 2022
As discussed in netbox-community#10639, all three `COOKIE_PATH`s should be set accordingly with the netbox-`BASE_PATH` to improve coexistance with other Django-projects probably hosted on the same Host
jeremystretch pushed a commit that referenced this issue Oct 20, 2022
As discussed in #10639, all three `COOKIE_PATH`s should be set accordingly with the netbox-`BASE_PATH` to improve coexistance with other Django-projects probably hosted on the same Host
jeremystretch added a commit that referenced this issue Oct 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants