Sha256: d920501e0ec01b02ed806627ec6c14eeee759d3f0bd73d43529e358b98de9802
Contents?: true
Size: 1019 Bytes
Versions: 1
Compression:
Stored size: 1019 Bytes
Contents
WebAdminApp.use Rack::ReverseProxy do config = get_config url = "http://#{config.prometheus_pushgateway_host}:#{config.prometheus_pushgateway_port}/#{config.prometheus_pushgateway_path}" reverse_proxy /^\/pushgateway\/?(.*)$/, url reverse_proxy_options preserve_host: true end WebAdminApp.use Rack::ReverseProxy do reverse_proxy /^\/prometheus\/?(.*)$/, get_config.prometheus_url reverse_proxy_options preserve_host: true end WebAdminApp.get '/proxy/links' do get_menu 4 config = get_config if config.webadmin_proxy == true then @proxy = true @pushgateway_url = "http://#{config.webadmin_ip}:#{config.webadmin_port}/pushgateway" @prometheus_url = "http://#{config.webadmin_ip}:#{config.webadmin_port}/prometheus" else @proxy = false @pushgateway_url = "http://#{config.prometheus_pushgateway_host}:#{config.prometheus_pushgateway_port}/#{config.prometheus_pushgateway_path}" @prometheus_url = "http://#{config.prometheus_url}" end slim :proxy, :format => :html end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prometheus-splash-0.6.0 | lib/splash/webadmin/portal/controllers/proxy.rb |