문제

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?

도움이 되었습니까?

해결책

No. Only real HTTP headers can be used for this.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top