ERR_TOO_MANY_REDIRECTS when accessing /admin
GuimaraesJC opened this issue · 4 comments
I'm trying to configure NetlifyCMS on my Next.js application. After following all steps mentioned on the README.md, I'm trying to access https://guimaraes.tech/admin but I keep receiving this error:
This is my configuration on Github:
I have the files auth.ts
and callback.ts
as described on documentation:
I'm also using the vercel.json
file with the following content:
{
"trailingSlash": true
}
This domain https://guimaraes.tech was bought on GoDaddy, and this is the current configuration:
And Vercel recognizes it as correct:
Environment variables on Vercel are correct.
I have two of them:
OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET
And finally, this is my current public/admin/config.yml
file:
backend:
name: github
branch: main
repo: GuimaraesJC/guimaraes.tech
base_url: https://guimaraes.tech/
auth_endpoint: api/auth
publish_mode: editorial_workflow
media_folder: "public/images/uploads"
public_folder: "/images/uploads"
collections:
...
...
...
Can you help me figure out what is the problem here?
Thanks for the very detailed report.
What do you see if you check "persist logs" in the network tab of the web inspector and go through the flow, what sort of cycle is it stuck in?
@robb-j
It keeps redirecting me from admin
to admin/
over and over until it fails.
You should have "trailingSlash" set to true, it looks like its currently false?
If you've had both values set there might be an issue that vercel is using a http 308 "Permanent Redirect" which browsers might not bother re-fetching resources as it has been permanently changed. Try setting it back to true
and reloading with "Disable cache" checked, if not maybe try a different browser to see if the changes have taken effect?
Please reopen if you're still having issues