Skip to content

Incorrect redirection to IP address 127.0.0.1 in Keystatic #366

@DaviLhlapak

Description

@DaviLhlapak

When I access my project in dev mode at http://localhost:3000/keystatic, I always get redirected to http://127.0.0.1:3000/keystatic and receive an ERR_CONNECTION_REFUSED error from my browser. I think this is because I'm using Windows WSL2, and the IP address 127.0.0.1 doesn't work by default.

I tested this by adding it to an existing Next.js 13 project and a new template project from Keystatic CLI, and both encountered this error.

Why is Keystatic redirecting to this IP? Did I miss some configuration?

Config File (Same as in the docs):

// keystatic.config.ts
import { config, fields, singleton } from '@keystatic/core'

export default config({
    storage: {
        kind: 'local'
    },
    singletons: {
        homepage: singleton({
            label: 'Homepage',
            path: 'src/content/_homepage',
            schema: {
                headline: fields.text({ label: 'Headline' })
            }
        })
    }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions