node10-express-template icon indicating copy to clipboard operation
node10-express-template copied to clipboard

Enabled cors

Open AlenJoseph opened this issue 5 years ago • 1 comments

Hi, I was creating a short URL service with openfaas , while integrating the function with react js front end, It showed

Access to fetch at 'http://192.168.99.100:31112/function/getstat' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

. so I edited the templates which enable cors and it worked fine, so I thought it would be a good feature to add to the templates

AlenJoseph avatar Jul 27 '19 12:07 AlenJoseph

Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide. Tip: if you only have one commit so far then run: git commit --amend --signoff and then git push --force.

derek[bot] avatar Jul 27 '19 12:07 derek[bot]