-
I keep getting "You are not allowed to access this page." just after logging in.I've managed to deploy PayloadCMS to heroku (YAY!) and:
What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hey @quornik, I can help you out here. I see your license in our system. It looks like we haven't received any licensing requests for that particular domain or email, which is likely why your admin panel is giving you this response. Can you verify in your Dev Tools that when you reload your admin panel that a request goes out to Worth noting that we don't validate licensing when you're running on localhost, so that isn't an indication that licensing is configured correctly or incorrectly. |
Beta Was this translation helpful? Give feedback.
-
Hey @denolfe , thanks for Your reply. I've mentioned the localhost, to avoid questions like "is Your password correct?" :D To actually deploy to heroku, I needed to slightly modify server.js. instead of: also in package.json I needed to duplicate "serve" script command and change the duplicate to "start" so Heroku recognizes the start command. And While at it, I did move all devDependencies besiede Have any idea what am I doing wrong? :) |
Beta Was this translation helpful? Give feedback.
-
OK I FIGURED IT OUT <{facepalm}> This was like very disutrbing for me: I assumed that since we have the installation working via nginx, and since we do need to have it hosted both locally and on production, the idea to hardcode this "http://localhost:3000" to the config is ok, and the actual switching of the final url is happening on nginx level. Turns out I was very wrong. I was looking on those simple http requests on console, and the first was always to the domain, and the rest - admin api calls - were to the localhost. It works fine now. |
Beta Was this translation helpful? Give feedback.
-
Just to make something for the community out of this, I wrote simple guide covering the non standard, Heroku specific approach to deployment: #473 Hope You'll find it helpful. Cheers also! |
Beta Was this translation helpful? Give feedback.
OK I FIGURED IT OUT <{facepalm}>
The crucial part is: Dear oerthinking developer (that's me ) Please do change "serverUrl" to the domain you are actually deploying to.
This was like very disutrbing for me: I assumed that since we have the installation working via nginx, and since we do need to have it hosted both locally and on production, the idea to hardcode this "http://localhost:3000" to the config is ok, and the actual switching of the final url is happening on nginx level. Turns out I was very wrong. I was looking on those simple http requests on console, and the first was always to the domain, and the rest - admin api calls - were to the localhost.
It works fine now.
thanks!