Procházet zdrojové kódy

Merge pull request #3450 from shleeable/patch-4

Updated Trustedproxy with safer default + Added diagnostic detail to TRUST_PROXIES
daniel před 3 roky
rodič
revize
ef4260c506

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@
 - Add storage flags to admin dashboard diagnostics ([#3444](https://github.com/pixelfed/pixelfed/pull/3444))
 - Hardcode UTC application timezone to prevent timezone issues ([b0d2c5e1](https://github.com/pixelfed/pixelfed/commit/b0d2c5e1))
 - Remove arbitrary metro url redirect timeout ([84209c24](https://github.com/pixelfed/pixelfed/commit/84209c24))
+- Add trusted proxies flag to admin dashboard diagnostics ([#3450](https://github.com/pixelfed/pixelfed/pull/3450))
 - Fix json-ld attributes, fixes #3423 ([95f902b1](https://github.com/pixelfed/pixelfed/commit/95f902b1))
 - Update exp config, enforce mastoapi compatibility by default ([a160b233](https://github.com/pixelfed/pixelfed/commit/a160b233))
 

+ 1 - 1
config/trustedproxy.php

@@ -23,5 +23,5 @@ return [
      * how many proxies that client's request has
      * subsequently passed through.
      */
-    'proxies' => env('TRUST_PROXIES', ''),
+    'proxies' => env('TRUST_PROXIES', '*'),
 ];

+ 5 - 0
resources/views/admin/diagnostics/home.blade.php

@@ -184,6 +184,11 @@
 			<strong><span class="badge badge-primary">Storage</span> Filesystems default (local/s3/spaces): </strong>
 			<span>{{ config_cache('filesystems.default')}}</span>
 		</li>
+		<li>
+			<strong><span class="badge badge-primary">Network</span> TrustedProxy: </strong>
+			<span>{{ config('trustedproxy.proxies') }}</span>
+		</li>
+
 	</ul>
 </div>
 <div class="pb-3 border-bottom">