security rework and memory optimilizations.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test what headers are being sent to Organizr
|
||||
"""
|
||||
import asyncio
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
from src.clients.npm_client import get_npm_client
|
||||
|
||||
|
||||
async def main():
|
||||
npm = get_npm_client()
|
||||
|
||||
# Find home.schweitz.net
|
||||
hosts = await npm.get_proxy_hosts()
|
||||
|
||||
for host in hosts:
|
||||
if 'home.schweitz.net' in host.get('domain_names', []):
|
||||
print(f"Found: {', '.join(host.get('domain_names', []))}")
|
||||
print(f"Forward to: {host.get('forward_scheme')}://{host.get('forward_host')}:{host.get('forward_port')}")
|
||||
print()
|
||||
|
||||
config = host.get('advanced_config', '')
|
||||
|
||||
print("Checking for Authentik headers in nginx config:")
|
||||
print("=" * 60)
|
||||
|
||||
headers_to_check = [
|
||||
'X-authentik-username',
|
||||
'X-authentik-email',
|
||||
'X-authentik-groups',
|
||||
'X-authentik-name',
|
||||
'X-authentik-uid'
|
||||
]
|
||||
|
||||
for header in headers_to_check:
|
||||
if f'proxy_set_header {header}' in config:
|
||||
print(f"✓ {header} is configured")
|
||||
else:
|
||||
print(f"✗ {header} is NOT configured")
|
||||
|
||||
print()
|
||||
print("Full advanced config:")
|
||||
print("=" * 60)
|
||||
print(config)
|
||||
|
||||
break
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user