ZupIT/beagle

Docs Reference Infinity Loop on Prod

Closed this issue · 0 comments

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

bug-example-video.mp4

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. just access -> docs-reference.usebeagle.io or docs-reference-beta.usebeagle.io

Expected Results

  • The proxy file responsible for redirecting the user to docs-reference.usebeagle.io/android/ when accessing DNS: https://docs.usebeagle.io was redirecting to a directory that does not have an index.html file to be rendered by the cloud front.

  • With that, an error was generated because by default the cloud front redirects the user again to https://docs-reference.usebeagle.io which in turn will redirect again to httos://docs-reference.usebeagle.io/android/ creating a redirects loop.

Solution

  • To solve this, it is necessary for the index.html file in the root of the bucket to redirect the user to a directory in the s3 bucket that contains another index.html file to be rendered by the cloud front.

  • But this solution might not be the best one, as the page added to the index.html proxy at the root of the bucket, would be statically defined, and might not exist in the future, causing the problem to recur again.

  • The ideal would be to think of a way to dynamically redirect to a Dokka page or add a landing page/home page in the root of the s3 bucket that redirects to valid pages.

  • A temporary solution was applied from this PR: #1689