You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting this error http://local.drupal8-host.dev:8000/node/2 401 (Unauthorized).Any idea what's is wrong with my setup? Basically I just followed the instructions on README.
I am not sure if I understand #3 Copy in the provided rest.settings.yml configuration. though.
The text was updated successfully, but these errors were encountered:
@geraldvillorente I ran into this same issue with my local D8 setup. It turned out to be a CORS issue.
Chrome console: XMLHttpRequest cannot load http://d8rest.local/node/1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3333' is therefore not allowed access.
I run nginx locally, so I was able to add one line in nginx.conf to bypass CORS. Be aware this is not a secure solution for a live web site but works fine for local development. For nginx, place this line somewhere in your nginx.conf server { } block:
To answer the original question a little bit. After enabling the rest modules, enable permissions for the Anon user or authenticated user depending on what access you want for the GET, POST, PATCH, DELETE operations.
Using the Rest UI module adds a GUI to set the Rest configuration instead of using the rest.settings.yml file.
I am getting this error
http://local.drupal8-host.dev:8000/node/2 401 (Unauthorized)
.Any idea what's is wrong with my setup? Basically I just followed the instructions on README.I am not sure if I understand
#3 Copy in the provided rest.settings.yml configuration.
though.The text was updated successfully, but these errors were encountered: