diff --git a/build.sh b/.travis-ci/build.sh similarity index 100% rename from build.sh rename to .travis-ci/build.sh diff --git a/.travis-ci/deploy.sh b/.travis-ci/deploy.sh new file mode 100644 index 0000000000..b4c132022a --- /dev/null +++ b/.travis-ci/deploy.sh @@ -0,0 +1 @@ +echo 'Nothing to deploy right now.' \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index b17e8026f2..8406222a16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ +dist: xenial + arch: - amd64 os: linux -language: minimal +language: shell notifications: email: @@ -23,6 +25,8 @@ before_install: echo "${DOCKERHUB_PULL_PASSWORD}" | docker login --username "${DOCKERHUB_PULL_USERNAME}" --password-stdin fi - docker --version +- docker buildx create --use +- chmod -R u+x ./.travis-ci install: - docker-compose up -d @@ -33,4 +37,12 @@ script: - docker-compose logs appwrite - docker-compose exec appwrite doctor - docker-compose exec appwrite vars -- docker-compose exec appwrite test \ No newline at end of file +- docker-compose exec appwrite test + +deploy: + - provider: script + edge: true + script: ./.travis-ci/deploy.sh + on: + repo: appwrite/appwrite + branch: deploy diff --git a/app/controllers/general.php b/app/controllers/general.php index 0ac19d5897..445563301d 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -51,7 +51,11 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo $port = \parse_url($request->getOrigin($referrer), PHP_URL_PORT); $refDomain = (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.((\in_array($origin, $clients)) - ? $origin : 'localhost') . (!empty($port) ? ':'.$port : ''); + ? $origin : 'localhost').(!empty($port) ? ':'.$port : ''); + + $refDomain = (!$route->getLabel('origin', false)) // This route is publicly accessible + ? $refDomain + : (!empty($protocol) ? $protocol : $request->getProtocol()).'://'.$origin.(!empty($port) ? ':'.$port : ''); $selfDomain = new Domain($request->getHostname()); $endDomain = new Domain((string)$origin); @@ -110,7 +114,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $user, $lo } $response->addHeader('Strict-Transport-Security', 'max-age='.(60 * 60 * 24 * 126)); // 126 days - } + } $response ->addHeader('Server', 'Appwrite') diff --git a/app/views/console/account/index.phtml b/app/views/console/account/index.phtml index 84a18521de..3f1e7decc9 100644 --- a/app/views/console/account/index.phtml +++ b/app/views/console/account/index.phtml @@ -29,6 +29,8 @@
Update Password PLEASE NOTE: Account deletion is irreversible.

getParam('version', '').'.'.APP_CACHE_BUSTER;
- Manage Your Server API Keys + Manage Your Server API Keys
@@ -221,6 +239,8 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);

New Web App

getParam('usageStatsEnabled',true);