mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
/stylesheet.css: Don't attempt to redirect to None.
Caused when a subreddit has a static stylesheet, but not a secure static stylesheet and /r/whatever/stylesheet.css is accessed over HTTPS.
This commit is contained in:
@@ -407,7 +407,11 @@ class FrontController(RedditController, OAuth2ResourceController):
|
||||
|
||||
if c.site.stylesheet_is_static:
|
||||
# TODO: X-Private-Subreddit?
|
||||
redirect_to(Reddit.get_subreddit_stylesheet_url())
|
||||
url = Reddit.get_subreddit_stylesheet_url()
|
||||
if url:
|
||||
redirect_to(url)
|
||||
else:
|
||||
self.abort404()
|
||||
else:
|
||||
if not c.secure:
|
||||
stylesheet_contents = c.site.stylesheet_contents
|
||||
|
||||
Reference in New Issue
Block a user