No. Only real HTTP headers can be used for this.
How to use meta tag to declare http Access-Control-Allow-Origin
-
31-05-2022 - |
Question
Access-Control-Allow-Origin
is typically declared as an HTTP header to enable a browser to fetch content from remote domains. Is it possible for this to be declared via the HTML <meta>
tag?
Solution
OTHER TIPS
In .html files
In .php files header('Access-Control-Allow-Origin: *');
Try this:
Client Side
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
Server Side
Remember that you must include the corresponding header.
PHP Example:
header('Access-Control-Allow-Origin: *');
You MUST have the HTML tag AND the Server Header.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow