Commit c14d36d4ea5d120372b2f2d8a34f9b78f59a3e14

Authored by Igor Kulikov
1 parent 2fcc9077

Update haproxy config

@@ -56,20 +56,17 @@ frontend http-in @@ -56,20 +56,17 @@ frontend http-in
56 56
57 reqadd X-Forwarded-Proto:\ http 57 reqadd X-Forwarded-Proto:\ http
58 58
59 - acl acl_static path_beg /static/ /index.html  
60 - acl acl_static path /  
61 - acl acl_static_rulenode path_beg /static/rulenode/  
62 -  
63 acl transport_http_acl path_beg /api/v1/ 59 acl transport_http_acl path_beg /api/v1/
64 acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/ 60 acl letsencrypt_http_acl path_beg /.well-known/acme-challenge/
  61 + acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /static/rulenode/
65 62
66 redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true } 63 redirect scheme https if !letsencrypt_http_acl !transport_http_acl { env(FORCE_HTTPS_REDIRECT) -m str true }
67 64
68 use_backend letsencrypt_http if letsencrypt_http_acl 65 use_backend letsencrypt_http if letsencrypt_http_acl
69 use_backend tb-http-backend if transport_http_acl 66 use_backend tb-http-backend if transport_http_acl
70 - use_backend tb-web-backend if acl_static !acl_static_rulenode 67 + use_backend tb-api-backend if tb_api_acl
71 68
72 - default_backend tb-api-backend 69 + default_backend tb-web-backend
73 70
74 frontend https_in 71 frontend https_in
75 bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM 72 bind *:${HTTPS_PORT} ssl crt /usr/local/etc/haproxy/default.pem crt /usr/local/etc/haproxy/certs.d ciphers ECDHE-RSA-AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
@@ -79,15 +76,12 @@ frontend https_in @@ -79,15 +76,12 @@ frontend https_in
79 reqadd X-Forwarded-Proto:\ https 76 reqadd X-Forwarded-Proto:\ https
80 77
81 acl transport_http_acl path_beg /api/v1/ 78 acl transport_http_acl path_beg /api/v1/
82 -  
83 - acl acl_static path_beg /static/ /index.html  
84 - acl acl_static path /  
85 - acl acl_static_rulenode path_beg /static/rulenode/ 79 + acl tb_api_acl path_beg /api/ /swagger /webjars /v2/ /static/rulenode/
86 80
87 use_backend tb-http-backend if transport_http_acl 81 use_backend tb-http-backend if transport_http_acl
88 - use_backend tb-web-backend if acl_static !acl_static_rulenode 82 + use_backend tb-api-backend if tb_api_acl
89 83
90 - default_backend tb-api-backend 84 + default_backend tb-web-backend
91 85
92 backend letsencrypt_http 86 backend letsencrypt_http
93 server letsencrypt_http_srv 127.0.0.1:8080 87 server letsencrypt_http_srv 127.0.0.1:8080