Quantcast

How to add http headers to all roundup responses?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to add http headers to all roundup responses?

John P. Rouillard
Hi all:

I want to add some CSP (content security policy) headers to all
the pages and I would prefer to not use the meta- headers in the document.

How do you add to the client headers? I know about calling
self.client.additional_headers['header-here'] = 'value'.  But the only
place I have used that is in a new action.

In this case I want to add it to all pages. The only thing
I can think of is to use the trackers interfaces.py and

  class Client(client.Client):
      ''' derives basic CGI implementation from the standard module,
          with any specific extensions
      '''

      additional_headers['header-here'] = 'value'

to hijack the default Client class and add the headers. Obviously my
example above is bogus so if anybody has helpful hint's if I have to
go this route I would appreciate it.

Thanks.

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Roundup-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/roundup-devel
Loading...