diff --git a/CHANGES.md b/CHANGES.md index 359f39fb4..1eff76d71 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,10 @@ -- Fix admin-mode session expiration, and expired session deletion [#4739](https://github.com/appwrite/appwrite/pull/4739) + +# Version 1.1.2 +## Changes +- Make `region` parameter optional with default for project create [#4763](https://github.com/appwrite/appwrite/pull/4763) +- Fix session expiration, and expired session deletion [#4739](https://github.com/appwrite/appwrite/pull/4739) # Version 1.1.1 - ## Bugs - Fix Deletes worker using incorrect device for file deletion [#4662](https://github.com/appwrite/appwrite/pull/4662) - Fix Migration for Stats adding the region attribute [#4704](https://github.com/appwrite/appwrite/pull/4704) diff --git a/Dockerfile b/Dockerfile index f63ed3ddd..95073df08 100755 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,12 @@ COPY app/console /usr/local/src/console WORKDIR /usr/local/src/console +ARG VITE_GA_PROJECT +ARG VITE_CONSOLE_MODE + +ENV VITE_GA_PROJECT=$VITE_GA_PROJECT +ENV VITE_CONSOLE_MODE=$VITE_CONSOLE_MODE + RUN npm ci RUN npm run build diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index d1dfea724..1e70a99fc 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -59,7 +59,7 @@ App::post('/v1/projects') ->param('projectId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string `ID.unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') ->param('name', null, new Text(128), 'Project name. Max length: 128 chars.') ->param('teamId', '', new UID(), 'Team unique ID.') - ->param('region', '', new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn($config) => !$config['disabled']))), 'Project Region.') + ->param('region', 'default', new Whitelist(array_keys(array_filter(Config::getParam('regions'), fn($config) => !$config['disabled']))), 'Project Region.', true) ->param('description', '', new Text(256), 'Project description. Max length: 256 chars.', true) ->param('logo', '', new Text(1024), 'Project logo.', true) ->param('url', '', new URL(), 'Project URL.', true) diff --git a/app/controllers/general.php b/app/controllers/general.php index 069a91868..0c10dd46e 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -223,7 +223,9 @@ App::init() return $response->redirect('https://' . $request->getHostname() . $request->getURI()); } + } + if ($request->getProtocol() === 'https') { $response->addHeader('Strict-Transport-Security', 'max-age=' . (60 * 60 * 24 * 126)); // 126 days } diff --git a/composer.lock b/composer.lock index 3b4148a95..e97546287 100644 --- a/composer.lock +++ b/composer.lock @@ -3358,16 +3358,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.18", + "version": "9.2.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a" + "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/12fddc491826940cf9b7e88ad9664cf51f0f6d0a", - "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559", + "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559", "shasum": "" }, "require": { @@ -3423,7 +3423,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.18" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19" }, "funding": [ { @@ -3431,7 +3431,7 @@ "type": "github" } ], - "time": "2022-10-27T13:35:33+00:00" + "time": "2022-11-18T07:47:47+00:00" }, { "name": "phpunit/php-file-iterator",