Move the Access Control headers to a middleware.

This commit is contained in:
abdulmohsen
2024-05-19 15:48:22 +03:00
parent 91610dddeb
commit 6d6b804bdc
5 changed files with 24 additions and 10 deletions

View File

@@ -268,8 +268,6 @@ final class Index
'Cache-Control' => 'no-cache',
'Connection' => 'keep-alive',
'X-Accel-Buffering' => 'no',
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Credentials' => 'true',
],
body: StreamClosure::create($callable)
))->withoutHeader('Content-Length');

View File

@@ -139,8 +139,6 @@ final class Command
'Cache-Control' => 'no-cache',
'Connection' => 'keep-alive',
'X-Accel-Buffering' => 'no',
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Credentials' => 'true',
'Last-Event-Id' => time(),
],
body: StreamClosure::create($callable)