Starts in:
0 DAY
23 HRS
18 MIN
21 SEC
Starts in:
0 D
23 H
18 M
21 S
Open Closed

Gateway API gives antiforgerytoken exception on localhost #1549


User avatar
0
rick@i-pulse.nl created

Hi,

When we run the webgateway on localhost and do a POST, we got an errorcode 400 in Swagger and in the application log an Antiforgerytoken exception. We did the authorize offcouse and the GET methods works fine. When I do the call in Azure Kubernetes it also works fine. This happens in all modules so also the default ABP modules.

Is there a setting to ignore this validation on localhost? Or how can we solve this? We are using the Microservices template.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Did you try to clear cookies or try in the privacy mode of your browser?

  • User Avatar
    0
    rick@i-pulse.nl created

    Yes and yes. And we have this on multiple computers and also after creating a new Microservice solution. Looks like thisi is a validation done in one of the ABP packages.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    When we run the webgateway on localhost and do a POST, we got an errorcode 400 in Swagger and in the application log an Antiforgerytoken exception.

    Can you provide steps to reproduce this problem in the local environment? And what is your ABP Framework version?

  • User Avatar
    0
    rick@i-pulse.nl created

    When we run the webgateway on localhost and do a POST, we got an errorcode 400 in Swagger and in the application log an Antiforgerytoken exception.

    Can you provide steps to reproduce this problem in the local environment? And what is your ABP Framework version?

    1. Create a new Microservice solution with ABP4.3.3.
    2. Build and run all services
    3. Open swagger of the gateway in the browser
    4. Authorize in swagger
    5. Execute a POST in swagger

    That is going wrong

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi rick

    We will fix this.

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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