From 2c863437afd1b29d41154dba3b641c3bf0f22fc3 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 15 Jan 2016 15:46:35 -0800 Subject: [PATCH] fix self-service fallout from clickjacking fix, RT#39881 --- FS/FS/Mason/Request.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FS/FS/Mason/Request.pm b/FS/FS/Mason/Request.pm index 537ba2d78..c4520c882 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/) ) { -- 2.11.0