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/) ) {