Add trusted proxies support
This commit is contained in:
@@ -67,5 +67,6 @@ CACHET_BEACON=false
|
|||||||
CACHET_EMOJI=false
|
CACHET_EMOJI=false
|
||||||
CACHET_AUTO_TWITTER=true
|
CACHET_AUTO_TWITTER=true
|
||||||
CACHET_PATH=/
|
CACHET_PATH=/
|
||||||
|
CACHET_TRUSTED_PROXIES=""
|
||||||
|
|
||||||
NIGHTWATCH_ENABLED=false
|
NIGHTWATCH_ENABLED=false
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||||||
->withMiddleware(function (Middleware $middleware) {
|
->withMiddleware(function (Middleware $middleware) {
|
||||||
$middleware->redirectGuestsTo(fn () => route('login'));
|
$middleware->redirectGuestsTo(fn () => route('login'));
|
||||||
$middleware->redirectUsersTo(AppServiceProvider::HOME);
|
$middleware->redirectUsersTo(AppServiceProvider::HOME);
|
||||||
|
$middleware->trustProxies(at: explode(',', config('cachet.trusted_proxies')));
|
||||||
|
|
||||||
$middleware->throttleApi();
|
$middleware->throttleApi();
|
||||||
})
|
})
|
||||||
|
|||||||
22
composer.lock
generated
22
composer.lock
generated
@@ -1096,12 +1096,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/cachethq/core.git",
|
"url": "https://github.com/cachethq/core.git",
|
||||||
"reference": "7101318bb438e704a6ca71a45f43d9207e60b473"
|
"reference": "4476d44b2846ddbf26306c7f52b706abdab35d95"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/cachethq/core/zipball/7101318bb438e704a6ca71a45f43d9207e60b473",
|
"url": "https://api.github.com/repos/cachethq/core/zipball/4476d44b2846ddbf26306c7f52b706abdab35d95",
|
||||||
"reference": "7101318bb438e704a6ca71a45f43d9207e60b473",
|
"reference": "4476d44b2846ddbf26306c7f52b706abdab35d95",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1127,9 +1127,10 @@
|
|||||||
"twig/twig": "^3.0"
|
"twig/twig": "^3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dedoc/scramble": "0.12.0-alpha.1",
|
"dedoc/scramble": "^0.12.11",
|
||||||
"larastan/larastan": "^3.0",
|
"larastan/larastan": "^3.4",
|
||||||
"laravel/pail": "^1.1",
|
"laravel/pail": "^1.1",
|
||||||
|
"laravel/pint": "^1.21",
|
||||||
"orchestra/testbench": "^9.5.1",
|
"orchestra/testbench": "^9.5.1",
|
||||||
"pestphp/pest": "^3.2",
|
"pestphp/pest": "^3.2",
|
||||||
"pestphp/pest-plugin-laravel": "^3.0",
|
"pestphp/pest-plugin-laravel": "^3.0",
|
||||||
@@ -1190,8 +1191,15 @@
|
|||||||
"start": [
|
"start": [
|
||||||
"@dev"
|
"@dev"
|
||||||
],
|
],
|
||||||
|
"test:lint": [
|
||||||
|
"pint --test"
|
||||||
|
],
|
||||||
|
"test:unit": [
|
||||||
|
"pest --parallel --processes=10 --ci --compact"
|
||||||
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"vendor/bin/pest"
|
"@test:lint",
|
||||||
|
"@test:unit"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"license": [
|
"license": [
|
||||||
@@ -1214,7 +1222,7 @@
|
|||||||
"issues": "https://github.com/cachethq/core/issues",
|
"issues": "https://github.com/cachethq/core/issues",
|
||||||
"source": "https://github.com/cachethq/core"
|
"source": "https://github.com/cachethq/core"
|
||||||
},
|
},
|
||||||
"time": "2025-02-27T09:22:00+00:00"
|
"time": "2025-05-08T11:51:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "carbonphp/carbon-doctrine-types",
|
"name": "carbonphp/carbon-doctrine-types",
|
||||||
|
|||||||
Reference in New Issue
Block a user