Any idea why I can't get my cors working?

Posted 1 year ago by rvabrazaldo

I've been spending more than 12 hours trying to find why it doesnt work.

here is my API route

Route::middleware(['cors'])->group(function () {

    Route::post('/login', '[email protected]'); <---- the cors middleware works here

    Route::middleware(['auth:api'])->group(function () { <--- anything inside here cors doesn't work

        Route::post('/logout', '[email protected]');
    
        Route::get('/projects', '[email protected]');
    });

});

Please sign in or create an account to participate in this conversation.