IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.0KB

  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. server {
  9. listen 80;
  10. location / {
  11. error_page 403 /403.html;
  12. set $test "";
  13. if ($uri ~ ^/api) {
  14. set $test "api";
  15. }
  16. rewrite ^/admin1/ $uri break;
  17. if ($uri ~ ^/([^/]*)/([^/]*)/(wiki|releases|issues)) {
  18. return 403;
  19. }
  20. rewrite ^/([^/]*)/([^/]*)/settings/(collaboration|branches) $uri break;
  21. if ($uri ~ ^/([^/]*)/([^/]*)/settings) {
  22. set $test "settings";
  23. }
  24. if ($request_method != "GET") {
  25. set $test "${test}_not-get";
  26. }
  27. if ($test = "settings_not-get") {
  28. return 403;
  29. }
  30. rewrite ^/api/v1/repos/[^/]*/[^/]*/markdown$ $uri break;
  31. rewrite ^/api/v1/markdown(/raw)?$ $uri break;
  32. if ($test = "api_not-get") {
  33. return 403;
  34. }
  35. root /usr/local/share/gitea/public;
  36. proxy_pass http://localhost:3000/;
  37. }
  38. }
  39. }