-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Example allowing direct connections from any host with any headers
$cors= new class() implements Filter {
public function filter($request, $response, $invokation) {
$response->header('Access-Control-Allow-Origin', '*');
$response->header('Access-Control-Allow-Headers', '*');
if ('OPTIONS' === $request->method()) {
$response->answer(200);
return;
}
return $invokation->proceed($request, $response);
}
};Should there be an implementation for this in web.filters?
Metadata
Metadata
Assignees
Labels
No labels