D
D
dc65k2020-12-22 10:49:54
CORS
dc65k, 2020-12-22 10:49:54

Why doesn't the CORS policy block requests for third-party resources (domains) when uploading media files?

Hello. Tell me why, if the DOM tree has links, for example, the img tag to third-party resources where images are stored, then CORS does not block such requests?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuriy Vorobyov, 2020-12-22
@dc65k

It just doesn't ask for origin permissions by default , but you can set the crossorigin attribute to change this behavior. <img>, <script>, stylesheet <link>, и <iframe>

O
OCTAGRAM, 2021-01-13
@OCTAGRAM

CORS does not block what was allowed before, CORS allows what was previously not allowed. It was possible to read media files before.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question