I have an Angular app running at http://localhost:4200 and a Lumen API running at http://localhost:8000.
I'm using barryvdh/laravel-cors and all my POSTS requests returns "No 'Access-Control-Allow-Origin' header is present on the requested resource."
Any clues about that? My Angular Database Service:
@Injectable()
export class DatabaseService {
constructor(private http: Http) { }
get(url: string) {
return this.http.get("http://localhost:8000/" + url)
.map(response => response.json());
}
post(url: string, data) {
return this.http.post("http://localhost:8000/"+ url, data)
.map(response => response.json());
}
}
All GET requests work properly.