Custom RESTful api GET request only works if user is already logged in, although _access has been set to 'TRUE' Controller outputs a json response. On local machine it works fine weather user is logged in or not. But on the server if the use is not logged in to drupal the single page application that fetches unpublished nodes using ajax call gets 503 (Service Unavailable) error. I have done what this link says and set _access: 'TRUE' in the routing.yml file and tried couple of other things but no luck. Any idea what could be the cause?
The problem of no json output was, it turned out, because the site was under maintenance mode! And like Berdir said 503 is not access denied error!