Skip to content

Commit

Permalink
BAH-3149 | Add proxy pass rule for Grafana (#10)
Browse files Browse the repository at this point in the history
* BAH-3149 | Add proxy pass rule for grafana

* BAH-3149 | Fix. Add Rewrite rule in the right place
  • Loading branch information
mohan-13 authored Aug 8, 2023
1 parent 38af9c6 commit 3b58740
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions resources/bahmni-proxy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ ProxyPass /metabase http://metabase:3000
ProxyPassReverse /metabase http://metabase:3000

#Grafana
ProxyPass /grafana ws://grafana:3000
ProxyPassReverse /grafana ws://grafana:3000
ProxyPass /grafana ws://grafana:3000/grafana
ProxyPassReverse /grafana ws://grafana:3000/grafana


#SMS Service
ProxyPass /sms-service http://sms-service:8080
Expand Down Expand Up @@ -158,6 +159,13 @@ Listen 443
SSLCertificateFile "/etc/tls/cert.pem"
SSLCertificateKeyFile "/etc/tls/key.pem"

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/grafana/api/*
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
Header set Content-Security-Policy upgrade-insecure-requests
RewriteRule ^/?(.*) "ws://grafana:3000/$1" [P,L]

RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
Expand Down

0 comments on commit 3b58740

Please sign in to comment.