mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 07:19:25 -05:00
Add a custom header to private subreddit CSS.
We'll use this header to disable infrastructure-level caching to protect subreddit privacy.
This commit is contained in:
@@ -366,6 +366,8 @@ class FrontController(RedditController):
|
||||
must_revalidate=False)
|
||||
c.response_content_type = 'text/css'
|
||||
c.response.content = c.site.stylesheet_contents
|
||||
if c.site.type == 'private':
|
||||
c.response.headers['X-Private-Subreddit'] = 'private'
|
||||
return c.response
|
||||
else:
|
||||
return self.abort404()
|
||||
|
||||
Reference in New Issue
Block a user