08-10-2022 10:27 AM
Hi
I am new to Alfresco. About 3 years ago I did a development where through APIS I sent a Wordpress file to Alfresco. This was super good. Now I want to implement it again and it doesn't work for me. I get this error
08-12-2022 10:50 AM
@viperboys Take a look at this thread: https://hub.alfresco.com/t5/alfresco-content-services-forum/cors-configuration-in-acs-7-0/m-p/308982...
https://github.com/abhinavmishra14/enable-cors-acs-demo
08-15-2022 10:53 AM
@abhinavmishra14 My observation for cors settings above Alfresco 6.0 version is once we place three jars enablecors-1.0.jar , cors-filter-2.5.jar and java-property-utils-1.9.1.jar at path $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/ ,
no need of configuring cors settings in $TOMCAT_DIR/webapps/alfresco/WEB-INF/web.xml file as was specified in your above post . Just placing above three jar files should work .
And better option would be to place it in $Alfresco_Dir/modules/platform/ as tomcat alfresco directory will re-explode in case of any changes to alfresco.war file and changes will be lost in that case .
08-16-2022 01:42 PM
thanks @ash_saxena10 i am not sure about your observation. The example was tested with 7.x and you have to add the allowOrigin option in the web.xml.
Thanks for additonal details on the jar location. Yes it is useful when you setup manually using distribution or have a non-containerized deployment. The example is based on containerized deployment. Images are pre-built with exploded wars already and hence DockerFile will copy the jars to appropriate locations.
Check here: https://github.com/abhinavmishra14/enable-cors-acs-demo/blob/master/build-config/alfresco/Dockerfile...
05-25-2023 01:17 PM
I'm using alfresco and when i make a requisition on my front (localhost:4200) to the alfresco's backend api (localhost:8080), i got a cors issue and tried a lot to fix that problem, but with no sucess.
I use windows and used that instalation mode:
https://github.com/Alfresco/alfresco-sdk/blob/master/docs/getting-started.md
I cant find some files to help that kind of issue because of the instalation method i think. That files simply doesnt exist.
Files like cors that u open with notepad and edit as you want, putting filters or adding some properties.
Also, i tried to find the alfresco-global-config.property, i found it, but when i put properties that works with that authorizations, like that:
cors.enabled=true
cors.allowed.origins=http://localhost:4200
cors.allowed.methods=GET,POST,PUT,DELETE,OPTIONS
cors.allowed.headers=* cors.allow.credentials=false
it doesnt work. Im really hope that anyone could help me at this point.
thanks!
05-30-2023 05:38 AM
I did it.
My issue with cors was simple to solve.
I used proxy to mascarate my back end url as an api context, so they allow me to make requests.
1. Create a file on the same folder of package,json named proxy.conf.json
2. Inside this files, put:
Explore our Alfresco products with the links below. Use labels to filter content by product module.