auth npm config.txt 1.1 KB

123456789101112131415161718192021222324252627282930
  1. location /authelia {
  2. internal;
  3. set $upstream_authelia http://150.107.72.154:9091/api/verify; #ADD YOUR IP AND PORT OF AUTHELIA
  4. proxy_pass_request_body off;
  5. proxy_pass $upstream_authelia;
  6. proxy_set_header Content-Length "";
  7. # Timeout if the real server is dead
  8. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
  9. client_body_buffer_size 128k;
  10. proxy_set_header Host $host;
  11. proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
  12. proxy_set_header X-Real-IP $remote_addr;
  13. proxy_set_header X-Forwarded-For $remote_addr;
  14. proxy_set_header X-Forwarded-Proto $scheme;
  15. proxy_set_header X-Forwarded-Host $http_host;
  16. proxy_set_header X-Forwarded-Uri $request_uri;
  17. proxy_set_header X-Forwarded-Ssl on;
  18. proxy_redirect http:// $scheme://;
  19. proxy_http_version 1.1;
  20. proxy_set_header Connection "";
  21. proxy_cache_bypass $cookie_session;
  22. proxy_no_cache $cookie_session;
  23. proxy_buffers 4 32k;
  24. send_timeout 5m;
  25. proxy_read_timeout 240;
  26. proxy_send_timeout 240;
  27. proxy_connect_timeout 240;
  28. }