Changed redirect to correct domain
This commit is contained in:
parent
0594a25e47
commit
2bd9fbf02c
3 changed files with 12 additions and 9 deletions
|
@ -28,10 +28,6 @@ WORKDIR /var/cinemapress
|
|||
COPY package.json /var/cinemapress/package.json
|
||||
RUN set -o pipefail \
|
||||
&& apk update \
|
||||
# && apk add -u --no-cache libpng librsvg libgsf giflib libjpeg-turbo musl \
|
||||
# && apk add vips-dev fftw-dev build-base --update-cache \
|
||||
# --repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
|
||||
# --repository http://dl-3.alpinelinux.org/alpine/edge/main \
|
||||
&& apk --no-cache add --virtual .build-dependencies make g++ gcc gtk-doc gobject-introspection expat-dev glib-dev libpng-dev libjpeg-turbo-dev giflib-dev librsvg-dev \
|
||||
&& apk add -u --no-cache sudo python wget curl tar gzip unzip git sed bash nano openrc openssl dos2unix busybox-extras tzdata \
|
||||
&& apk add -u --no-cache npm mysql-client memcached sphinx=2.2.11-r1 \
|
||||
|
|
2
lib/CP_get.min.js
vendored
2
lib/CP_get.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -271,10 +271,17 @@ module.exports = function(lookup) {
|
|||
var conf_domain = url.parse(req.userinfo.origin).hostname;
|
||||
var host_domain = url.parse(req.userinfo.protocol + '://' + host).hostname;
|
||||
|
||||
if (
|
||||
(conf_domain && host_domain && conf_domain !== host_domain) ||
|
||||
(config.protocol !== req.userinfo.protocol + '://' &&
|
||||
typeof req.query[config.protocol.replace('://', '')] === 'undefined')
|
||||
if (conf_domain && host_domain && conf_domain !== host_domain) {
|
||||
return next({
|
||||
status: 301,
|
||||
message:
|
||||
config.protocol +
|
||||
req.userinfo.domain +
|
||||
req.originalUrl.replace(/^\/(mobile|tv)-version/i, '')
|
||||
});
|
||||
} else if (
|
||||
config.protocol !== req.userinfo.protocol + '://' &&
|
||||
typeof req.query[config.protocol.replace('://', '')] === 'undefined'
|
||||
) {
|
||||
return next({
|
||||
status: 301,
|
||||
|
|
Loading…
Reference in a new issue