feat: add subnet-based CORS validation support for VPN/Tailscale origins

- Add ipaddress module for subnet parsing (10.0.0.0/24 format)
- Implement subnet validation in CORS middleware
- Separate individual IPs from subnet definitions in EXTRA_ALLOWED_ORIGINS
- Custom SubnetAwareCORSMiddleware for dynamic origin validation
- Support both exact IP matches and subnet ranges
- Backward compatible with existing ALLOWED_ORIGINS list
This commit is contained in:
2026-04-21 15:17:29 +03:00
parent 8825118795
commit 983d6e4bb4
4 changed files with 114 additions and 17 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "inventory-pwa",
"version": "0.1.0",
"version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "inventory-pwa",
"version": "0.1.0",
"version": "0.2.0",
"dependencies": {
"axios": "^1.15.0",
"clsx": "^2.1.1",