K
K
Kirill Zver2019-10-14 22:03:43
Nginx
Kirill Zver, 2019-10-14 22:03:43

How to fix Access-Control-Allow-Origin on nginx?

Good day, I've been trying to fix this for quite a long time, everything is even.
5da4c68d015ba529024362.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grinat, 2019-10-15
@grinat

I somehow connect in conjunction with express:
npm i cors --save

const app = express()
const server = http.Server(app)
const io = socketIO(server, {
  path: `${API_PREFIX}/ws`
})

app.use(cors())

and in general, I didn’t even know that there was a hemorrhoid with cors

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question