File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ /*
4
+ * This file is a part of the Civ14 project.
5
+ *
6
+ * Copyright (c) 2025-present Valithor Obsidion <[email protected] >
7
+ */
8
+
9
+ namespace VerifierServer \Endpoints ;
10
+
11
+ use VerifierServer \Endpoint ;
12
+
13
+ class FaviconEndpoint extends Endpoint
14
+ {
15
+ public function handle (
16
+ string $ method ,
17
+ $ request ,
18
+ int |string &$ response ,
19
+ array &$ headers ,
20
+ string &$ body
21
+ ): void {
22
+ $ response = 200 ;
23
+ $ headers = ['Content-Type ' => 'image/x-icon ' ];
24
+ $ body = @file_get_contents (__DIR__ . '/../../assets/favicon.ico ' ) ?: '' ;
25
+ }
26
+ }
Original file line number Diff line number Diff line change 17
17
use React \Http \Message \ServerRequest ;
18
18
use SS14 \Endpoints \OAuth2Endpoint as SS14OAuth2Endpoint ;
19
19
use VerifierServer \Endpoints \Interfaces \EndpointInterface ;
20
- // use VerifierServer\Endpoints\USPSEndpoint ;
20
+ use VerifierServer \Endpoints \FaviconEndpoint ;
21
21
use VerifierServer \Endpoints \SS14VerifiedEndpoint ;
22
+ //use VerifierServer\Endpoints\USPSEndpoint;
22
23
use VerifierServer \Endpoints \VerifiedEndpoint ;
23
24
use VerifierServer \Traits \HttpMethodsTrait ;
24
25
@@ -128,6 +129,7 @@ public function __construct(
128
129
}
129
130
protected function afterConstruct (): void
130
131
{
132
+ $ this ->endpoints ['/favicon.ico ' ] = new FaviconEndpoint (new FaviconEndpoint ());
131
133
//$this->endpoints['/usps'] = new USPSEndpoint($_ENV['USPS_USERID'] ?? getenv('USPS_USERID'));
132
134
}
133
135
You can’t perform that action at this time.
0 commit comments