remove responding 204 for unexisted players
This commit is contained in:
parent
092eedfdf4
commit
6c64d191ab
@ -341,7 +341,6 @@ class AdminController extends Controller
|
||||
$resources = Option::form('resources', OptionForm::AUTO_DETECT, function ($form) {
|
||||
$form->checkbox('force_ssl')->label()->hint();
|
||||
$form->checkbox('auto_detect_asset_url')->label()->description();
|
||||
$form->checkbox('return_204_when_notfound')->label()->description();
|
||||
|
||||
$form->text('cache_expire_time')->hint(OptionForm::AUTO_DETECT);
|
||||
$form->text('cdn_address')
|
||||
|
@ -29,7 +29,6 @@ return [
|
||||
'auto_del_invalid_texture' => 'false',
|
||||
'allow_downloading_texture' => 'true',
|
||||
'texture_name_regexp' => '',
|
||||
'return_204_when_notfound' => 'false',
|
||||
'cache_expire_time' => '31536000',
|
||||
'max_upload_file_size' => '1024',
|
||||
'force_ssl' => 'false',
|
||||
|
@ -179,10 +179,6 @@ resources:
|
||||
title: Assets URL
|
||||
label: Determine assets url automatically.
|
||||
description: Please unable this if assets URLs are wrongly generated under a CDN. The site url will be used if this is not enabled.
|
||||
return_204_when_notfound:
|
||||
title: HTTP Response Code
|
||||
label: Return 204 instead of 404 when requesting non-existent player.
|
||||
description: If your CDN doesn't cache 404 pages, please turn this on. A flood of requests to non-existent players will greatly slow down the site.
|
||||
cache_expire_time:
|
||||
title: Cache Exipre Time
|
||||
hint: In seconds, 86400 = one day, 31536000 = one year.
|
||||
|
@ -68,6 +68,7 @@
|
||||
- Removed auto update check.
|
||||
- Removed cache for Profile JSON.
|
||||
- Removed cache for existence of player.
|
||||
- Removed settings of "Respond 204 for unexisted players". (Install plugin if you need it.)
|
||||
|
||||
## Internal Changes
|
||||
|
||||
|
@ -68,6 +68,7 @@
|
||||
- 移除自动更新检查
|
||||
- 移除对 Profile JSON 的缓存
|
||||
- 移除对角色存在与否的缓存
|
||||
- 移除「对不存在的角色返回 204」的选项(如有需要,请安装插件)
|
||||
|
||||
## 内部更改
|
||||
|
||||
|
@ -171,13 +171,11 @@ class AdminFormsTest extends BrowserKitTestCase
|
||||
$this->visit('/admin/resource')
|
||||
->check('force_ssl')
|
||||
->uncheck('auto_detect_asset_url')
|
||||
->check('return_204_when_notfound')
|
||||
->type('0', 'cache_expire_time')
|
||||
->type('url/', 'cdn_address')
|
||||
->press('submit_resources');
|
||||
$this->assertTrue(option('force_ssl'));
|
||||
$this->assertFalse(option('auto_detect_asset_url'));
|
||||
$this->assertTrue(option('return_204_when_notfound'));
|
||||
$this->assertEquals('0', option('cache_expire_time'));
|
||||
$this->visit('/')->see('url/app/');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user