URL that causes redirect is loaded twice by Chrome

12 Views Asked by At

I am currently working on a URL shortening service that tracks the number of clicks on shortened URLs by recording the access time in DynamoDB (formatted as "2024-04-02T12:12:54.123456+09:00").

However, I'm encountering an issue where accessing the shortened URL (e.g., shorturl.com/abc123) through Chrome sometimes logs two records for a single redirect.

https://i.stack.imgur.com/3Xz3w.png

The CloudFront redirect behavior is set to 'Managed-CachingDisabled', and the API Gateway response is configured with a 302 HTTP method.

0

There are 0 best solutions below