Permalink
Browse files

work for #126, addresses query string issue for product services

  • Loading branch information...
shawnmjones committed Sep 5, 2018
1 parent 224e866 commit 5d7b380b454aec62262e267c80cc5a24139b6ef1
Showing with 5 additions and 3 deletions.
  1. +1 −1 config/default.py
  2. +4 −2 mementoembed/services/product.py
View
@@ -6,7 +6,7 @@
THUMBNAIL_WORKING_FOLDER = "/tmp/mementoembed/thumbnails"
THUMBNAIL_VIEWPORT_WIDTH = "1024"
THUMBNAIL_VIEWPORT_HEIGHT = "768"
THUMBNAIL_TIMEOUT = "15"
THUMBNAIL_TIMEOUT = "300"
THUMBNAIL_WIDTH = "208"
THUMBNAIL_HEIGHT = "156"
THUMBNAIL_REMOVE_BANNERS = "No"
@@ -107,7 +107,8 @@ def generate_socialcard_response(urim, preferences):
@bp.route('/services/product/socialcard/<path:subpath>')
def socialcard_endpoint(subpath):
urim = subpath
# because Flask trims off query strings
urim = request.full_path[len('/services/product/socialcard/'):]
prefs = {}
prefs['datauri_favicon'] = 'no'
@@ -139,7 +140,8 @@ def thumbnail_endpoint(subpath):
module_logger.debug("current app config: {}".format(current_app.config))
if current_app.config['ENABLE_THUMBNAILS'] == "Yes":
urim = subpath
# because Flask trims off query strings
urim = request.full_path[len('/services/product/thumbnail/'):]
if 'Prefer' in request.headers:

0 comments on commit 5d7b380

Please sign in to comment.