0

I have NodeJS on / path.

On /another.ejs path, I have a little website and I wanna get data from /value path.

I cannot do this call with pure JS and AJAX, because of CORS.

Can I do something like when I click on button, it calls function in NodeJS and return data?

John Doe
  • 13
  • 2

1 Answers1

0

I don't know why CORS is going on in same domain name, but you can try some other ways to get result from routes.

Using proxy to throw result between server and client.

You can use proxy things.

CORS Module

Also see above comment by codeherk.

Seia
  • 48
  • 1
  • 6