P
P
picka2020-09-28 18:45:38
JavaScript
picka, 2020-09-28 18:45:38

How to give CORS permission on server for video?

For a project on CodePen, I need a video from my hosting, but I constantly get an error related to CORS access.
Already dug up the entire Internet and did not understand how to make a normal server response.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
ReActor Dmitry Vershansky, 2020-09-28
@HunteR-VRX

Good afternoon.
Add the following directive to .htaccess:
Header set Access-Control-Allow-Origin '*'

B
bqio, 2020-09-28
@bqio

CORS warnings only appear on cross-domain requests. So stop parsing someone else's API. Well, you can try the extension for Chrome x)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question