Merge pull request #3345 from appwrite/feat-increase-jwt-abuse-limit
Feat increase jwt abuse limit
This commit is contained in:
commit
5ae6305eb4
|
@ -5,8 +5,10 @@ return [ // Based on this list @see http://stackoverflow.com/a/4212908/2299554
|
|||
'default_image' => __DIR__ . '/logos/image.png',
|
||||
|
||||
// Video Files
|
||||
|
||||
'video/mp4' => __DIR__ . '/logos/video.png',
|
||||
'video/x-flv' => __DIR__ . '/logos/video.png',
|
||||
'video/webm' => __DIR__ . '/logos/video.png',
|
||||
'application/x-mpegURL' => __DIR__ . '/logos/video.png',
|
||||
'video/MP2T' => __DIR__ . '/logos/video.png',
|
||||
'video/3gpp' => __DIR__ . '/logos/video.png',
|
||||
|
@ -14,6 +16,8 @@ return [ // Based on this list @see http://stackoverflow.com/a/4212908/2299554
|
|||
'video/x-msvideo' => __DIR__ . '/logos/video.png',
|
||||
'video/x-ms-wmv' => __DIR__ . '/logos/video.png',
|
||||
|
||||
|
||||
|
||||
// // Microsoft Word
|
||||
// 'application/msword' => __DIR__.'/logos/word.png',
|
||||
// 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => __DIR__.'/logos/word.png',
|
||||
|
|
|
@ -10,6 +10,7 @@ return [
|
|||
// Video Files
|
||||
'video/mp4',
|
||||
'video/x-flv',
|
||||
'video/webm',
|
||||
'application/x-mpegURL',
|
||||
'video/MP2T',
|
||||
'video/3gpp',
|
||||
|
|
|
@ -965,7 +965,7 @@ App::post('/v1/account/jwt')
|
|||
->label('sdk.response.code', Response::STATUS_CODE_CREATED)
|
||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||
->label('sdk.response.model', Response::MODEL_JWT)
|
||||
->label('abuse-limit', 10)
|
||||
->label('abuse-limit', 100)
|
||||
->label('abuse-key', 'url:{url},userId:{userId}')
|
||||
->inject('response')
|
||||
->inject('user')
|
||||
|
|
|
@ -211,7 +211,6 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) {
|
|||
});
|
||||
|
||||
Console::success('Server started successfully (max payload is ' . number_format($payloadSize) . ' bytes)');
|
||||
|
||||
Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}");
|
||||
|
||||
// listen ctrl + c
|
||||
|
|
|
@ -187,7 +187,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume
|
|||
});
|
||||
|
||||
$server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $realtime, $logError) {
|
||||
Console::success('Worker ' . $workerId . ' started succefully');
|
||||
Console::success('Worker ' . $workerId . ' started successfully');
|
||||
|
||||
$attempts = 0;
|
||||
$start = time();
|
||||
|
|
|
@ -703,7 +703,7 @@ sort($patterns);
|
|||
--functionId={{project-function.$id}} \
|
||||
--activate=true \
|
||||
--entrypoint='scriptFile' \
|
||||
--code='/myrepo/myfunction'" data-forms-code="bash" data-lang="bash" data-lang-label="Bash"></textarea>
|
||||
--code='.'" data-forms-code="bash" data-lang="bash" data-lang-label="Bash"></textarea>
|
||||
</div>
|
||||
|
||||
<p><b>PowerShell</b></p>
|
||||
|
@ -713,7 +713,7 @@ sort($patterns);
|
|||
--functionId={{project-function.$id}} `
|
||||
--activate=true `
|
||||
--entrypoint='scriptFile' `
|
||||
--code='/myrepo/myfunction'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell"></textarea>
|
||||
--code='.'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell"></textarea>
|
||||
</div>
|
||||
|
||||
<p>Learn more about <a href="https://appwrite.io/docs/server/functions#functionsCreateDeployment" target="_blank">creating deployments</a>, installing and using the <a href="https://appwrite.io/docs/command-line" target="_blank">Appwrite CLI</a>.</p>
|
||||
|
|
|
@ -10,11 +10,14 @@ If you are building your Flutter application for multiple devices, you have to f
|
|||
### Android
|
||||
For **Android** first add your app <u>name</u> and <u>package name</u>, Your package name is generally the **applicationId** in your app-level <a href="https://github.com/appwrite/playground-for-flutter/blob/0fdbdff98384fff940ed0b1e08cf14cfe3a2be3e/android/app/build.gradle#L41" target="_blank" rel="noopener">build.gradle</a> file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API.
|
||||
|
||||
In order to capture the Appwrite OAuth callback url, the following activity needs to be added to your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml). Be sure to replace the **[PROJECT_ID]** string with your actual Appwrite project ID. You can find your Appwrite project ID in your project settings screen in the console.
|
||||
In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `<application>` tag, along side the existing `<activity>` tags in your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml). Be sure to replace the **[PROJECT_ID]** string with your actual Appwrite project ID. You can find your Appwrite project ID in your project settings screen in the console.
|
||||
|
||||
```xml
|
||||
<manifest>
|
||||
<application>
|
||||
<manifest ...>
|
||||
....
|
||||
<application ...>
|
||||
....
|
||||
<!-- Add this inside the <application> tag, along side the existing <activity> tags -->
|
||||
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" >
|
||||
<intent-filter android:label="flutter_web_auth">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
|
|
@ -4,4 +4,6 @@ Files are managed using buckets. Storage buckets are similar to Collections we h
|
|||
|
||||
Using Appwrite permissions architecture, you can assign read or write access to each bucket or file in your project for either a specific user, team, user role, or even grant it with public access (`role:all`). You can learn more about [how Appwrite handles permissions and access control](/docs/permissions).
|
||||
|
||||
The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network.
|
||||
The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network.
|
||||
|
||||
The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 30 MB. See [Environment Variables](/docs/environment-variables#storage) for more information.
|
||||
|
|
|
@ -270,6 +270,7 @@ class AccountCustomClientTest extends Scope
|
|||
]));
|
||||
|
||||
$this->assertEquals($response['headers']['status-code'], 201);
|
||||
$this->assertEquals($response['headers']['x-ratelimit-remaining'], 99);
|
||||
$this->assertNotEmpty($response['body']['jwt']);
|
||||
$this->assertIsString($response['body']['jwt']);
|
||||
|
||||
|
|
Loading…
Reference in a new issue