Admin panel 401 error

I found a solution to the problem. Check my answer on stack overflow: nginx - Why would Strapi admin fail to login when site domain go through CloudFront CDN? - Stack Overflow