From ec89ff0ca822c82f94fdda547f5d9f5d7ba33c3c Mon Sep 17 00:00:00 2001 From: eldadfux Date: Thu, 21 Nov 2019 20:28:15 +0200 Subject: [PATCH] Updated domain setting --- app/init.php | 12 +++++++----- app/sdks/dart/.packages | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/init.php b/app/init.php index 8aa758632..6a8934024 100644 --- a/app/init.php +++ b/app/init.php @@ -43,15 +43,17 @@ $collections = include __DIR__.'/../app/config/collections.php'; // OAuth provid $redisHost = $request->getServer('_APP_REDIS_HOST', ''); $redisPort = $request->getServer('_APP_REDIS_PORT', ''); $utopia = new App('Asia/Tel_Aviv', $env); -$port = (string) (isset($_SERVER['HTTP_HOST'])) ? parse_url($_SERVER['HTTP_HOST'], PHP_URL_PORT) : ''; +$port = (string) parse_url($request->getServer('HTTP_HOST', ''), PHP_URL_PORT); Resque::setBackend($redisHost.':'.$redisPort); -define('COOKIE_DOMAIN', ( - $request->getServer('HTTP_HOST', null) === 'localhost' || - $request->getServer('HTTP_HOST', null) === 'localhost:'.$port) +define('COOKIE_DOMAIN', + ( + $request->getServer('HTTP_HOST', null) === 'localhost' || + $request->getServer('HTTP_HOST', null) === 'localhost:'.$port + ) ? null - : '.'.parse_url($request->getServer('HTTP_HOST', false), PHP_URL_HOST)); + : '.'.parse_url($request->getServer('HTTP_HOST', ''), PHP_URL_HOST)); define('COOKIE_SAMESITE', null); // Response::COOKIE_SAMESITE_NONE /* diff --git a/app/sdks/dart/.packages b/app/sdks/dart/.packages index b2b3f8176..6132450b5 100644 --- a/app/sdks/dart/.packages +++ b/app/sdks/dart/.packages @@ -1,4 +1,4 @@ -# Generated by pub on 2019-11-20 21:18:37.276237. +# Generated by pub on 2019-11-21 20:19:20.138749. charcode:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ collection:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/ cookie_jar:file:///Users/eldadfux/.pub-cache/hosted/pub.dartlang.org/cookie_jar-1.0.1/lib/