X-Git-Url: https://code.delx.au/cgiproxy/blobdiff_plain/0677bf739e158e9256a73fe911e04713b5aa2f40..40070216e54515585ee0a6b6ab6675cee49083d2:/ruby/path.cgi diff --git a/ruby/path.cgi b/ruby/path.cgi index 108d1f5..ac9054f 100755 --- a/ruby/path.cgi +++ b/ruby/path.cgi @@ -1,5 +1,10 @@ -#!/usr/bin/env ruby +#!/usr/bin/ruby require 'proxy.rb' -proxyTo "http://internalserver/somepath" +host = ENV["HTTP_HOST"] +case host +when "public.example.com" + host = "internal.example.com" +end +proxy_to "https://#{host}"