D
D
Dmitry2021-03-23 21:44:43
proxy
Dmitry, 2021-03-23 21:44:43

Problem with CORS on a remote server, although locally everything is ok. What's the matter?

The react application connects through the cctx library to exchange resources.
I run it locally - it gives a CORS error . I
set the Proxy parameter for the object -

const exchangeObj = new ccxt[exchangeId] (params)
if (proxy) exchangeObj.proxy = 'https://thingproxy.freeboard.io/fetch/'


Locally everything works without problems.

I'm building an application, uploading it to the server on beget - the error "Failed to load resource: the server responded with a status of 401 ()"

Although I repeat locally, everything works fine. Is it possible to somehow get to the bottom of the causes and fix them?

Thank you in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question