AnsweredAssumed Answered

alfresco/api 401 (Unauthorized)

Question asked by coisox on Feb 22, 2018

I'm new new to Alfresco Community Edition.

 

I download sample apps (called alfresco-client) from Developing a simple JavaScript client using the Alfresco REST API - Introducing the JavaScript client and put into my localhost. I have another Alfresco Community running at cloud.

 

When I run the sample apps from my localhost, I got 2 errors in my browser's console:

  1. alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children 401 (Unauthorized)
  2. CORS (I forgot the exact sentence)

 

Then I edit alfresco-community\tomcat\webapps\alfresco\WEB-INF\web.xml, I un-comment CORS Filter Begin segment and restart tomcat. When I re-run the sample apps, the 2nd error (CORS) gone. But the first error (unauthorized) remain.

 

Then I copy the sample apps from my localhost onto the same Alfresco server at alfresco-community/tomcat/webapps/here. If I run this sample apps, everything is fine.

 

So I guest un-comment the web.xml is not enough. Kindly help.

Outcomes