1$app->after(function (Request $request, Response $response) {
2 $response->headers->set('Access-Control-Allow-Origin', '*');
3 $response->headers->set("Access-Control-Allow-Credentials", "true");
4 $response->headers->set("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT");
5 $response->headers->set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization");
6 });
7