admin管理员组

文章数量:1125798

I am new to the WordPress world, please bare with me.

On my website have embedded some YouTube videos using the video block. I am seeing this error in the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at . (Reason: CORS request did not succeed). Status code: (null).

I have enabled the CORS header in .htaccess as followed.

<IfModule mod_headers.c>
     Header set Access-Control-Allow-Origin *
</IfModule>

Why do is still see an error?

Thanks kocjs

I am new to the WordPress world, please bare with me.

On my website have embedded some YouTube videos using the video block. I am seeing this error in the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://googleads.g.doubleclick.net/pagead/id. (Reason: CORS request did not succeed). Status code: (null).

I have enabled the CORS header in .htaccess as followed.

<IfModule mod_headers.c>
     Header set Access-Control-Allow-Origin *
</IfModule>

Why do is still see an error?

Thanks kocjs

Share Improve this question edited Jan 29, 2024 at 11:43 kocjs asked Jan 28, 2024 at 9:18 kocjskocjs 235 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

I have found out that i have enabled tracking protection in that particular Firefox profile. A relevant warning, which i oversaw by just displaying the errors, was also displayed.

The resource at “https://googleads.g.doubleclick.net/pagead/id” was blocked because content blocking is enabled.

Apparently https://googleads.g.doubleclick.net/pagead/id. does honor the tracking protection setting.

Today i learned to use a clean browser profile to debug my website...

kocjs

本文标签: phpYouTube embeds CrossOrigin Request Blocked (CORB) error