Closed i10111pn closed 4 years ago
Launching docker image with cors config file fixed the issue.
docker run --name mynuxeo --user nuxeo:nuxeo --mount type=bind,source="/home/i10111pn/Configs/cors-config.xml",target=/opt/nuxeo/server/templates/docker/config/cors-config.xml.nxftl --rm -ti -p 8080:8080 -e NUXEO_PACKAGES="nuxeo-web-ui" nuxeo:9.10
Where cors-config.xml
:
<component name="org.nuxeo.cors.config">
<extension target="org.nuxeo.ecm.platform.web.common.requestcontroller.service.RequestControllerService" point="corsConfig">
<corsConfig name="all" supportedMethods ="GET,POST,HEAD,OPTIONS,DELETE,PUT">
<pattern>/nuxeo/.*</pattern>
</corsConfig>
</extension>
</component>
Hi.
I have a react application that is trying to connect to the nuxeo ui. Nuxeo is launched by a docker command:
docker run --name mynuxeo --rm -ti -p 8080:8080 -e NUXEO_PACKAGES="nuxeo-web-ui nuxeo-showcase-content nuxeo-template-rendering nuxeo-template-rendering-samples" -e NUXEO_CUSTOM_PARAM="org.nuxeo.dev=true\nallowOrigin=http://localhost:3000\nallowSubdomains=true\nsupportedMethods=GET,POST,HEAD,OPTIONS" nuxeo:9.10
and accessible in the browser at http://172.17.0.2:8080/nuxeo/ or http://localhost:8080/nuxeo/.
The react application is created by create-react-app. My
package.json:
Inside of the react application, I have the next code:
Which is producing the next error:
Request params are next:
Is there a way to fix this?