소스 검색

Make the proxy_pass address use a variable

Adjust the proxy_pass port/IP so that it follows the matrix_grafana_container_http_host_bind_port variable when using an external webserver. The code checks how long the variable is (if the user has set just a port, <port>, or the full address, <ip>:<port>), and sets the proxy_pass value accordingly.
pull/884/head
pulmonarycosignerkindness 5 년 전
committed by GitHub
부모
커밋
8ec12905bb
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-grafana.conf.j2

+ 5
- 1
roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-grafana.conf.j2 파일 보기

@@ -18,7 +18,11 @@
proxy_pass http://$backend;
{% else %}
{# Generic configuration for use outside of our container setup #}
proxy_pass http://127.0.0.1:3000;
{% if matrix_grafana_container_http_host_bind_port|length > 5 %}
proxy_pass http://{{matrix_grafana_container_http_host_bind_port}};
{% else %}
proxy_pass http://127.0.0.1:{{matrix_grafana_container_http_host_bind_port}};
{% endif %}
{% endif %}

proxy_set_header Host $host;


불러오는 중...
취소
저장