File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 77use Laminas \Diactoros \Request ;
88use Laminas \Diactoros \Response ;
99use Laminas \Diactoros \Response \HtmlResponse ;
10+ use Laminas \Diactoros \Response \TextResponse ;
1011use Laminas \Diactoros \ServerRequestFactory ;
1112use Laminas \HttpHandlerRunner \Emitter \SapiEmitter ;
1213use League \Container \Container ;
160161// @FIXME: CORS handling, slash-adding (and possibly others?) should be added as middleware instead of "catchall" URLs map
161162
162163/*/ Create URI groups /*/
164+ if (file_exists (__DIR__ . '/favicon.ico ' ) === false ) {
165+ $ router ->map ('GET ' , '/favicon.ico ' , static function () {
166+ return (new TextResponse (
167+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><circle cx="1" cy="1" r="1" fill="#FFFF00"/></svg> ' ,
168+ ))->withHeader ('Content-type ' , 'image/svg+xml ' );
169+ });
170+ }
171+
163172$ router ->map ('GET ' , '/login ' , AddSlashToPathController::class);
164173$ router ->map ('GET ' , '/profile ' , AddSlashToPathController::class);
165174
You can’t perform that action at this time.
0 commit comments