S1SYPHOS / Gulp-Kirby-Starter-Kit

Getting started with Gulp v4 & Kirby v3 in no-time
MIT License
47 stars 6 forks source link

Panel Problem? #15

Closed Joeysay closed 3 years ago

Joeysay commented 3 years ago

Hello there,

i am not really a developer so I am not sure if it is an issure of just problem by me. But the kit can only work if i add port:4000 under server:{connet:{}} in config.js. And if I open http://localhost:4000/panel/ direct, it shows error like this: (but http://127.0.0.1:4000/panel works. )

Access to fetch at 'http://127.0.0.1:4000/api/system?view=panel' from origin 'http://localhost:4000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any idea why is that?

S1SYPHOS commented 3 years ago

Good catch! I'll investigate (and fix) this.

The live server (under port 4000) aids in developing the frontend and isn't meant for accessing the panel. You may do that directly though, as you correctly pointed out.

S1SYPHOS commented 3 years ago

I'll close this because I cannot reproduce your problem. Feel free to open this issue up again if need be.