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:
@@ -24,4 +24,4 @@ CLAUDE_API_KEY=sk-ant-api03-13S9Ge3ai43Ia89yfxwwdkoodhddLV1ByVfdmpccqfA-zF-27BLF
|
||||
|
||||
# External Access (CORS)
|
||||
# Comma-separated list of extra IPs or FQDNs allowed to connect (e.g. Tailscale, VPN)
|
||||
EXTRA_ALLOWED_ORIGINS=100.78.182.27,192.168.84.131
|
||||
EXTRA_ALLOWED_ORIGINS=100.78.182.0/24
|
||||
|
||||
Reference in New Issue
Block a user