OS: mac majave 10.14.6
brower: chrome 76.0.3809.132
other odds and ends are the same with deploy guidance
issue produce:
git clone the sia-gateway project in master branch, prepared the java, node, maven .etc and do the build & package job.
start the gateway in docker
visit the url http://localhost:18086 by chrome and meet the cors issue as follow
Access to XMLHttpRequest at 'http://127.0.0.1:18086/vv1/getMutiGroupNames' from origin 'http://localhost:18086' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
temporary fix the issue and make the sys accessible:
add the following code in sia-gateway/sia-gateway-admin: .WebMvcConfiguration.java
`@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/")
.allowedOrigins("*")
.allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE");
}`
OS: mac majave 10.14.6 brower: chrome 76.0.3809.132 other odds and ends are the same with deploy guidance
issue produce:
git clone the sia-gateway project in master branch, prepared the java, node, maven .etc and do the build & package job.
start the gateway in docker
visit the url http://localhost:18086 by chrome and meet the cors issue as follow
Access to XMLHttpRequest at 'http://127.0.0.1:18086/vv1/getMutiGroupNames' from origin 'http://localhost:18086' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
temporary fix the issue and make the sys accessible: add the following code in sia-gateway/sia-gateway-admin: .WebMvcConfiguration.java `@Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/") .allowedOrigins("*") .allowedMethods("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"); }`