ASP.NET Core Antiforgery Token Share Between Docker Container When Scale Up

99 Views Asked by At

I have a simple problem with updating form in AWS ECS, the project is using .NET Core AntiForgeryToken, and when it's generated by one container, and the request got round-robin by AWS ECS VPC, it cause return 400 and the submition of the form failed.

My Question is, is there anyway to share those antiforgery token between container of .NET Core, so it won't cause error 400 ?

For information, I use builtin .NET Core Validation antiforgery Attribute https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.validateantiforgerytokenattribute.-ctor?view=aspnetcore-8.0&viewFallbackFrom=netcore-3.1

I tried to look into MS Docs, but I can't find any, google/bing/stackoverflow either.

Any Help or Pointer is greatly appreciated

0

There are 0 best solutions below