我做的.NET跨域职位,但在净,他们为我提供了PHP的例子....我想的PHP代码转换为.NET.请帮忙.
<?php
header('Content-type: text/html');
header('Access-Control-Allow-Origin: *');
$uri = 'http'. ($_SERVER['HTTPS'] ? 's' : null) .'://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
echo('<p>This information has come from <a href="' . $uri . '">' . $uri . '</a></p>');
?>
Run Code Online (Sandbox Code Playgroud)