Closed Jones-S closed 5 years ago
Ok, I see a solution for the second problem now.
If I change
'siteUrl'=> getenv('FRONTEND_URL'),
back to 'siteUrl'=> getenv('DEFAULT_SITE_URL'),
it works again on my local setup.
But I need the siteUrl
to be set to my frontend url because the preview should open the iframe with my frontend url (headless setup)...
Any ideas why the first problem appeared and how I could solve my existing problem?
On my remote I now get a new error:
Template not found: craftql/mydomain.com/api
And if I use my curl command I would still get 301 Moved Permanently
🤦🏼♂️ I am getting desperate...
Edit:
🤦🏼♂️ I had an error in my .env file. The DEFAULT_SITE_URL
missed the https://
part.
Would there be a way to debug those things bit quicker?
OK this ticket is really confusing. Sorry about that. Just if somebody comes along and tries to find his errors, here are a few pointers where to look for errors:
siteUrl
is set to the site where your craft installation is running?I hope that helps someone.
I have a craft installation together with craftql. Since a short time I cannot only not query within the CP graphiql window – I would get this error:
Unable to verify your data submission
– but also the$ curl
command fails with the message:301 Moved permanently
.I uninstalled CraftQL and reinstalled it, added a new token etc. But still always the same error.
I don't have any idea what could have caused this...
Any ideas? Could it be related to some
csrf
stuff?Edit: I changed the sites
Base Url
(for preview reasons) and added this to the config:(I am not sure if this is super bad)
Anyway it did not help: And now I would get this error
TypeError: NetworkError when attempting to fetch resource.