X-Git-Url: https://code.delx.au/cgiproxy/blobdiff_plain/0677bf739e158e9256a73fe911e04713b5aa2f40..916eebc685a7ba1517cf94b5bacdc26a6071adbe:/ruby/path.cgi diff --git a/ruby/path.cgi b/ruby/path.cgi index 108d1f5..69f338e 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 +proxyTo "https://#{host}"