Closed zietas closed 6 years ago
Simply changing endpoint configuration will not fix anything as it causing CORS issues.
I've manage to fix it by altering rule on apache vhosts configuration.
<Location "/api"> Header set Access-Control-Allow-Origin "*" ProxyPass http://192.168.123.111:81/api </Location>
I have raised an issue with aet-coockbook pull request for windows-automation
Seems like the solution is in place. The only thing that should also be provide is a guide on how and why we have to do it this way. There is no mention about this in manual.
When doing this task please update also documentation at:
https://github.com/Cognifide/aet/blob/master/documentation/src/main/wiki/LinuxAndWindowsSetup.md
Instance setup:
Steps to reproduce
Expected I should be able to see report
Actual Report app is displaying connection error alerts
Reason In JS Console we can see that reports app is trying to contact "http://192.168.37.12/api/metadata?company=cognifide&project=pioneer&correlationId=cognifide-pioneer-pioneer-ci-1493362630699", but due to fact that we have no proxy, nothing is dispatching request to Apache Karaf. If we execute the same request with port "http://192.168.37.12:8181/api/metadata?company=cognifide&project=pioneer&correlationId=cognifide-pioneer-pioneer-ci-1493362630699" we can see that report is there.
In order to fix this issue we need to have an ability to define endpoint for reports app as well. At the moment in "endpointConfiguration" module we can se that it's simply using current domain as endpoint.