nginx.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
  2. location __PATH__/ {
  3. proxy_pass http://127.0.0.1:__PORT__/;
  4. proxy_redirect off;
  5. proxy_set_header Host $host;
  6. proxy_set_header X-Real-IP $remote_addr;
  7. proxy_set_header X-Forwarded-Proto $scheme;
  8. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  9. proxy_set_header X-Forwarded-Host $server_name;
  10. proxy_http_version 1.1;
  11. proxy_set_header Connection "upgrade";
  12. proxy_set_header Upgrade $http_upgrade;
  13. # setup for image upload
  14. client_max_body_size 256M;
  15. proxy_max_temp_file_size 1024M;
  16. proxy_read_timeout 300;
  17. proxy_connect_timeout 300;
  18. more_clear_input_headers 'Accept-Encoding';
  19. # Don't include SSOWAT user panel - breaks flohmarkt pages
  20. # include conf.d/yunohost_panel.conf.inc;
  21. # Instead try to put yunohost button + portal overlay at the end of body
  22. sub_filter </body> '</body><script type="text/javascript" src="/ynh_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynh_overlay.css"><script type="text/javascript" src="/ynhtheme/custom_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynhtheme/custom_overlay.css">';
  23. sub_filter_once on;
  24. # Apply to other mime types than text/html
  25. sub_filter_types application/xhtml+xml;
  26. # Prevent YunoHost panel files from being blocked by specific app rules
  27. location ~ (ynh_portal.js|ynh_overlay.css|ynh_userinfo.json|ynhtheme/custom_portal.js|ynhtheme/custom_overlay.css) {
  28. }
  29. }