mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
Expect the domain prefix for authorized cname origins.
This commit is contained in:
@@ -284,12 +284,13 @@ class Globals(object):
|
||||
|
||||
self.REDDIT_MAIN = bool(os.environ.get('REDDIT_MAIN'))
|
||||
|
||||
self.origin = "http://" + (self.domain_prefix + "." if self.domain_prefix else "") + self.domain
|
||||
origin_prefix = self.domain_prefix + "." if self.domain_prefix else ""
|
||||
self.origin = "http://" + origin_prefix + self.domain
|
||||
self.secure_domains = set([urlparse(self.payment_domain).netloc])
|
||||
if self.https_endpoint:
|
||||
self.secure_domains.add(urlparse(self.https_endpoint).netloc)
|
||||
|
||||
self.trusted_origins = [self.origin, self.https_endpoint] + ['http://' + cname for cname in self.authorized_cnames]
|
||||
self.trusted_origins = [self.origin, self.https_endpoint] + ['http://' + origin_prefix + cname for cname in self.authorized_cnames]
|
||||
|
||||
# load the unique hashed names of files under static
|
||||
static_files = os.path.join(self.paths.get('static_files'), 'static')
|
||||
|
||||
Reference in New Issue
Block a user