2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Url validation (#6045)

* Add new setting INVENTREE_STRICT_URLS

- Enforce schema prefix to URL validation
- Default  = True

* Implement new validation

* Also implement for DRF serializers
This commit is contained in:
Oliver
2023-12-06 17:17:15 +11:00
committed by GitHub
parent c778c067f5
commit 238902e4f3
5 changed files with 68 additions and 0 deletions

View File

@ -1175,6 +1175,13 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': '',
},
'INVENTREE_STRICT_URLS': {
'name': _('Strict URL Validation'),
'description': _('Require schema specification when validating URLs'),
'validator': bool,
'default': True,
},
'INVENTREE_REQUIRE_CONFIRM': {
'name': _('Require confirm'),
'description': _('Require explicit user confirmation for certain action.'),