I am running a Drupal 8.9.2 site as a content repository accessed via an Angular 8 app. So there is one administrator who uses the Drupal interface to write content / upload files eccc.... and anonymous users view that content via the Angular app.

I have set up some views with REST Export display and have been able to pull the content in my Angular app running both backend and frontend on localhost, but when I deployed to the server problems have arisen...

  1. all my calls fail or get canceled, this was the configuration on localhost: the Drupal website was in a folder in XAMPP/htdocs/example the views rest endpoints were like: http://localhost/example/web/api/content the Angular app was in a folder on the desktop and was served at http://localhost:4200/home

now I put all the files for both backend and frontend on the root folder on the server, I also have commented this line ErrorDocument 404 /index.php in the htaccess file found in the web folder so that non existent urls are managed by the Angular app

  1. how to make sure that Drupal articles and pages are not accessible to anonymous users and they are not indexed by Google?

  2. how to make sure that only the anonymous users of my Angular app can access the REST views endpoints and they can only make GET requests?

  3. how to make so that the Angular app allows me to go to the Drupal admin pages? In the app there is no route like example/web/admin/user so I get redirected to the App login page

Any suggestion and help is appreciated

Thanks Elena

  • 1
    This question is very broad-- in fact it's several questions in one. On this site, it's better to ask a single question per post. If you ask three questions and three different people answer one of each, how can you mark the best answer? So please rewrite the post to ask only a single question. Jul 13, 2020 at 8:49


Browse other questions tagged or ask your own question.