Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add setting for google integration protocol

Krzysztof Wolski698f69d79dfd
diff --git a/saleor/integrations/feeds.py b/saleor/integrations/feeds.py
index 707256f9e3..8283eee9be 100644
--- a/saleor/integrations/feeds.py
+++ b/saleor/integrations/feeds.py
@@ -24,10 +24,11 @@ GOOGLE_ATTRIBUTES = ['id', 'title', 'description', 'product_type',
class StaticFeed(Feed):
def get_feed(self, obj=None, request=None, feed_url_name=''):
current_site = Site.objects.get_current()
- link = add_domain(current_site.domain, '', False) # todo: check if this should be secure
+ link = add_domain(current_site.domain, '',
+ settings.INTEGRATIONS_ENABLE_SSL)
feed_url = add_domain(current_site.domain,
reverse(feed_url_name) if feed_url_name else '',
- False) # todo: check if this should be secure
+ settings.INTEGRATIONS_ENABLE_SSL)
feed = self.feed_type(title=self.title,
link=link,
description='',
@@ -41,7 +42,7 @@ class StaticFeed(Feed):
description = self.item_description(item)
link = add_domain(current_site.domain,
self.item_link(item),
- False) # todo: check if this should be secure
+ settings.INTEGRATIONS_ENABLE_SSL)
enclosures = self.item_enclosures(item)
feed.add_item(title=title,
link=link,
diff --git a/saleor/settings.py b/saleor/settings.py
index ef4fee9543..21db2d2377 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -236,6 +236,8 @@ ACCOUNT_ACTIVATION_DAYS = 3
LOGIN_REDIRECT_URL = 'home'
INTEGRATIONS_DIR = os.environ.get('INTEGRATIONS_DIR', '')
+INTEGRATIONS_ENABLE_SSL = ast.literal_eval(
+ os.environ.get('INTEGRATIONS_ENABLE_SSL', 'False'))
FACEBOOK_APP_ID = os.environ.get('FACEBOOK_APP_ID')
FACEBOOK_SECRET = os.environ.get('FACEBOOK_SECRET')