Use new reflection page CGI script

This commit is contained in:
swagg boi 2021-11-22 14:09:02 -05:00
parent b690b70444
commit 475a1286bb

View file

@ -20,10 +20,14 @@ styling = {
inner = { class: 'inner' } inner = { class: 'inner' }
outer = { class: 'outer' } outer = { class: 'outer' }
# Handle X-Forwarded-For header
x_forwarded_for = ENV['HTTP_X_FORWARDED_FOR'].split(/, ?/).first \
if ENV['HTTP_X_FORWARDED_FOR'] =~ /,/
# CGI Environment variables # CGI Environment variables
referer = cgi.referer || nil referer = cgi.referer || nil
user_agent = cgi.user_agent || nil user_agent = cgi.user_agent || nil
remote_addr = ENV['HTTP_X_FORWARDED_FOR'] || cgi.remote_addr || nil remote_addr = x_forwarded_for || cgi.remote_addr || nil
remote_port = ENV['HTTP_X_FORWARDED_PORT'] || ENV['REMOTE_PORT'] || nil remote_port = ENV['HTTP_X_FORWARDED_PORT'] || ENV['REMOTE_PORT'] || nil
request_method = cgi.request_method || nil request_method = cgi.request_method || nil
server_admin = ENV['SERVER_ADMIN'] || nil server_admin = ENV['SERVER_ADMIN'] || nil