From 8c4a1de8f2311ca139b1e313e0b23d278520b2d8 Mon Sep 17 00:00:00 2001 From: Yi Yi Date: Thu, 5 Nov 2020 09:17:15 +0800 Subject: [PATCH 01/20] update --- .../pylon-config/location.conf.template | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/pylon/deploy/pylon-config/location.conf.template b/src/pylon/deploy/pylon-config/location.conf.template index b1e303203c..dbd168f842 100644 --- a/src/pylon/deploy/pylon-config/location.conf.template +++ b/src/pylon/deploy/pylon-config/location.conf.template @@ -284,6 +284,28 @@ location ~ ^/dshuttle/(.*)$ { } {%- endif %} +{%- if MARKETPLACE_URI %} +# Marketplace server +location ~ ^/marketplace$ { + # Add '/' to the end of the URL, otherwise there will be a 404 error. + return 301 $scheme://$http_host$request_uri/; +} +location ~ ^/marketplace/(.*)$ { + proxy_pass {{MARKETPLACE_URI}}/$1$is_args$args; + sub_filter_types *; + sub_filter_once off; + sub_filter + 'href="/' + 'href="/marketplace/'; + sub_filter + '