abp icon indicating copy to clipboard operation
abp copied to clipboard

CORS issue on client side AJAX request

Open ertugrulbakidal opened this issue 3 years ago • 3 comments

  • ABP Framework version: 6.0.0-rc.1
  • User Interface: MVC
  • Database provider: EF Core

Hi, I have 3 MVC Apps:

  1. AuthServer (using OpenIddictModule) => https://localhost:44395
  2. Admin app (Web and API layers together in one project) => https://localhost:44319
  3. Client Web App => https://localhost:44384

My AuthServer is separated so that I can authenticate users from both apps (Admin and Client). I can make API requests from https://localhost:44384 to https://localhost:44319 on the server side it works well. But When I make an API request on the client side I've got a CORS error.

abp_auth_issue abp_auth_issue1 abp_auth_issue2

ertugrulbakidal avatar Sep 14 '22 20:09 ertugrulbakidal

hi

Please check your backend logs.

maliming avatar Sep 15 '22 00:09 maliming

I've checked and the error message is CORS policy execution failed, Request origin null does not have permission to access the resource.. AdminAppLogs.txt AuthServerLogs.txt

ertugrulbakidal avatar Sep 15 '22 12:09 ertugrulbakidal

Hi @maliming , Any ideas why I've got that issue?

ertugrulbakidal avatar Sep 17 '22 09:09 ertugrulbakidal

If your code is Ok. try to clean your bowser cache. delete all history and cookies...

aelhadi avatar Sep 26 '22 14:09 aelhadi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 27 '22 08:11 stale[bot]