Skip to content

Commit

Permalink
Add headers for WebSocket (#1689)
Browse files Browse the repository at this point in the history
* Add headers for WebSocket

* Remove the OrgID

* fix
  • Loading branch information
shokada authored Feb 17, 2020
1 parent f71504f commit 42fc522
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions production/ksonnet/loki/gateway.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,31 @@
proxy_set_header X-Scope-OrgID 1;
location = /api/prom/push {
proxy_pass http://distributor.%(namespace)s.svc.cluster.local$request_uri;
proxy_pass http://distributor.%(namespace)s.svc.cluster.local$request_uri;
}
location = /api/prom/tail {
proxy_pass http://querier.%(namespace)s.svc.cluster.local$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ /api/prom/.* {
proxy_pass http://query-frontend.%(namespace)s.svc.cluster.local$request_uri;
proxy_pass http://query-frontend.%(namespace)s.svc.cluster.local$request_uri;
}
location = /loki/api/v1/push {
proxy_pass http://distributor.%(namespace)s.svc.cluster.local$request_uri;
proxy_pass http://distributor.%(namespace)s.svc.cluster.local$request_uri;
}
location = /loki/api/v1/tail {
proxy_pass http://querier.%(namespace)s.svc.cluster.local$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ /loki/api/.* {
proxy_pass http://query-frontend.%(namespace)s.svc.cluster.local$request_uri;
proxy_pass http://query-frontend.%(namespace)s.svc.cluster.local$request_uri;
}
}
}
Expand Down

0 comments on commit 42fc522

Please sign in to comment.