showing results for - "header disallowed by preflight response in express"
Violeta
03 Jun 2017
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