From: Ivan Kohler Date: Fri, 15 Jan 2016 23:46:32 +0000 (-0800) Subject: fix self-service fallout from clickjacking fix, RT#39881 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=dfa43146bb9c472322b82c18a912f44401a76694 fix self-service fallout from clickjacking fix, RT#39881 --- diff --git a/FS/FS/Mason/Request.pm b/FS/FS/Mason/Request.pm index b33efcc17..0d9c6d448 100644 --- a/FS/FS/Mason/Request.pm +++ b/FS/FS/Mason/Request.pm @@ -65,9 +65,11 @@ sub freeside_setup { if fileno(STDOUT) != 1; } - FS::Trace->log(' adding headers'); - #frame-ancestors not supported by all the major browsers yet - $HTML::Mason::Commands::r->header_out( 'X-Frame-Options', 'SAMEORIGIN' ); + if ( $HTML::Mason::Commands::r ) { + FS::Trace->log(' adding headers'); + #frame-ancestors not supported by all the major browsers yet + $HTML::Mason::Commands::r->header_out( 'X-Frame-Options', 'SAMEORIGIN' ); + } if ( $filename =~ qr(/REST/\d+\.\d+/NoAuth/) ) {