Starts in:
1 DAY
21 HRS
48 MIN
18 SEC
Starts in:
1 D
21 H
48 M
18 S
Open Closed

No Access Control Allow Origin #4227


User avatar
0
tahseelit1 created

No "access control allow origin" header is present on requested encounter error when implementing nginx-ingress cache for both authserver and admin page.

to replicate the issue Step 1 - (Fail) ingress configmap file.

admin portal ingress configuration

authserver ingress configuration

Step 2 - (Success) This is completely improve the application loading performance into 70%

ingress configmap file.

admin portal ingress configuration

or maybe its not good idea to cache the authserver because of issuance of token and cookie. please advice.

Regards Moises B. Bas If you're creating a bug/problem report, please include followings:

  • ABP Framework version: vX.X.X
  • UI type: Angular / MVC / Blazor
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

3 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    It is not about ingress configuration actually. You need to add https://admineventtix.smartcube.co to CORS settings in the AuthServer (https://autheventtix.smartcube.co) appsettings.json (or override this enviroment variable).

  • User Avatar
    0
    tahseelit1 created

    hi there it's already there when i check the pods information in auth

    1. failed when i implement proxy cache in both admin portal and authserver via ingress deployment in kubernetes.
    2. Success when implement only in admin portal not authserver.
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Did you solve this problem?

    You may try checking kubectl describe deployment/auth-serverto see if the App__CorsOrigins is properly overwritten.

    For testing purposes, you can also remove app.UseCors() midware on AuthServer module OnApplicationInitialization or let any origin.

    Ingress caching shouldn't effect the application cors midware. Check if the request hits to server (authserver) even if you disabled CORS for authserver.

    Otherwise you can try configuring ingress with CORS configuration to see the difference as in this SO question.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06