Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Dev admin panel stuck loading

default discord avatar
blairc24992 years ago
16

I've just installed payload on a fresh ubuntu install and when i access the admin panel from my laptop it gets stuck with the loading screen over the welcome page. has anyone ever had this before?


im accessing the dev page at

http://(internalIP):3000/admin

instead of the cli's localhost:3000/admin

  • default discord avatar
    paulpopus2 years ago

    Is this deployed on a server? The browser console should give you some information, though I'd bet it's CORS

  • default discord avatar
    blairc24992 years ago

    yeh its on ubuntu 22.04 server



    in a proxmox VE host

  • default discord avatar
    paulpopus2 years ago

    Set a

    cors

    and

    csrf

    config in your payload config


    https://payloadcms.com/docs/configuration/overview#options
    https://payloadcms.com/docs/authentication/overview#csrf-protection

    set it to * for testing but after that you wanna set it to your actual domain names

  • default discord avatar
    blairc24992 years ago

    should that be generated automatically or do i need to generate it from scratch?

  • default discord avatar
    paulpopus2 years ago

    yeah you should have a

    payload.config.ts

    in

    src

    ?



    did you install payload from a template?

  • default discord avatar
    blairc24992 years ago

    i installed a blank project template from the installer



    so i assume that file will be blank

  • default discord avatar
    paulpopus2 years ago

    let me see

  • default discord avatar
    blairc24992 years ago

    when i run nano ./src/payloadconfig.ts i get this

  • default discord avatar
    paulpopus2 years ago

    ok yeah it generates a usable base payloadconfig



    in there you wanna add ^ the cors/csrf configuration

  • default discord avatar
    blairc24992 years ago

    ahh okay



    got it now



    so like this?



  • default discord avatar
    paulpopus2 years ago

    inside the buildConfig that's already provided



    but yes

  • default discord avatar
    blairc24992 years ago

    so here

  • default discord avatar
    paulpopus2 years ago

    also your serverUrl needs to be your ip:3000

  • default discord avatar
    blairc24992 years ago

    and then when it moved to prod it will be the external domain name and i change the CSRF and the CORS to the external domain name

  • default discord avatar
    paulpopus2 years ago

    yes

  • default discord avatar
    blairc24992 years ago

    Thanks paul, im in now

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.