{"id":1684,"date":"2025-09-29T14:04:17","date_gmt":"2025-09-29T05:04:17","guid":{"rendered":"https:\/\/www.ambulo.tv\/blog\/?p=1684"},"modified":"2025-09-29T15:12:14","modified_gmt":"2025-09-29T06:12:14","slug":"access-control-allow-origin-%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%81%a8%e3%81%9d%e3%81%ae%e5%80%a4","status":"publish","type":"post","link":"https:\/\/www.ambulo.tv\/blog\/access-control-allow-origin-%e3%83%98%e3%83%83%e3%83%80%e3%83%bc%e3%81%a8%e3%81%9d%e3%81%ae%e5%80%a4\/","title":{"rendered":"Access-Control-Allow-Origin \u30d8\u30c3\u30c0\u30fc\u3068\u305d\u306e\u5024"},"content":{"rendered":"\n<p>Access-Control-Allow-Origin \u30d8\u30c3\u30c0\u30fc\u306f\u3001**\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u30ea\u30bd\u30fc\u30b9\u5171\u6709\uff08CORS\uff09**\u306e\u4ed5\u7d44\u307f\u306e\u4e00\u90e8\u3067\u3001<strong>\u4ed6\u306e\u30aa\u30ea\u30b8\u30f3\uff08\u30c9\u30e1\u30a4\u30f3\uff09\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8a31\u53ef\u3059\u308b\u304b\u3069\u3046\u304b<\/strong>\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u30d8\u30c3\u30c0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001<strong>\u6307\u5b9a\u3057\u305f\u30aa\u30ea\u30b8\u30f3\uff08\u4f8b: https:\/\/example.com\uff09\u304b\u3089\u306e JavaScript \u306b\u3088\u308b XMLHttpRequest \u3084 Fetch API \u306a\u3069\u306e\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u8a31\u53ef\u3055\u308c\u308b<\/strong>\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Access-Control-Allow-Origin: https:\/\/example.com<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3001<code>https:\/\/example.com<\/code> \u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u8a31\u53ef\u3055\u308c\u307e\u3059\u304c\u3001\u305d\u308c\u4ee5\u5916\u306e\u30aa\u30ea\u30b8\u30f3\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u62d2\u5426\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Access-Control-Allow-Origin \u30d8\u30c3\u30c0\u30fc\u306f1<strong>\u3064\u306e\u30aa\u30ea\u30b8\u30f3\u3057\u304b\u6307\u5b9a\u3067\u304d\u306a\u3044\u3068\u3044\u3046HTTP\u4ed5\u69d8\u306e\u5236\u7d04<\/strong>\u304c\u3042\u308b\u305f\u3081\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e Origin \u306b\u5fdc\u3058\u3066\u52d5\u7684\u306b\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>1\u3064\u306e\u30aa\u30ea\u30b8\u30f3\u3057\u304b\u6307\u5b9a\u3067\u304d\u306a\u3044\u3068\u3044\u3046HTTP\u4ed5\u69d8\u306e\u5236\u7d04\u3000<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/HTTP\/Reference\/Headers\/Access-Control-Allow-Origin\">\ud83d\udd17<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u3088\u304f\u4f7f\u308f\u308c\u308b\u8a2d\u5b9a<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u8a2d\u5b9a\u5024<\/td><td>\u610f\u5473<\/td><\/tr><tr><td>*<\/td><td>\u3059\u3079\u3066\u306e\u30aa\u30ea\u30b8\u30f3\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u3092\u8a31\u53ef\uff08\u305f\u3060\u3057\u3001\u8a8d\u8a3c\u60c5\u5831\u4ed8\u304d\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\uff09<\/td><\/tr><tr><td>https:\/\/example.com<\/td><td>\u6307\u5b9a\u3057\u305f\u30aa\u30ea\u30b8\u30f3\u306e\u307f\u8a31\u53ef<\/td><\/tr><tr><td>\u8907\u6570\u30aa\u30ea\u30b8\u30f3<\/td><td>\u660e\u793a\u7684\u306b\u8907\u6570\u30aa\u30ea\u30b8\u30f3\u3092\u8a31\u53ef\u3059\u308b\u306b\u306f\u3001\u52d5\u7684\u306b\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff08IIS\u3067\u306fWeb.config\u3084\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u5bfe\u5fdc<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IIS\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u306e\u64cd\u4f5c\u624b\u9806<\/h3>\n\n\n\n<p><strong>\u2460 IIS\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3092\u8d77\u52d5<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows\u30ad\u30fc \u2192 \u300cIIS\u300d\u307e\u305f\u306f\u300c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 \u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3 \u30b5\u30fc\u30d3\u30b9\uff08IIS\uff09\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u300d\u3067\u691c\u7d22<\/li>\n\n\n\n<li>\u8d77\u52d5\u5f8c\u3001\u5de6\u30da\u30a4\u30f3\u3067\u5bfe\u8c61\u306e\u30b5\u30a4\u30c8\u3092\u9078\u629e<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u2461 HTTP\u5fdc\u7b54\u30d8\u30c3\u30c0\u30fc\u3092\u958b\u304f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bfe\u8c61\u30b5\u30a4\u30c8\u3092\u9078\u629e\u3057\u305f\u72b6\u614b\u3067\u3001\u4e2d\u592e\u30da\u30a4\u30f3\u306e\u300c\u6a5f\u80fd\u30d3\u30e5\u30fc\u300d\u304b\u3089<br><strong>\u300cHTTP \u5fdc\u7b54\u30d8\u30c3\u30c0\u30fc\u300d<\/strong> \u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u2462 \u30d8\u30c3\u30c0\u30fc\u306e\u8ffd\u52a0<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53f3\u30da\u30a4\u30f3\u306e\u300c\u64cd\u4f5c\u300d\u304b\u3089 <strong>\u300c\u8ffd\u52a0&#8230;\u300d<\/strong> \u3092\u30af\u30ea\u30c3\u30af<\/li>\n\n\n\n<li>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5165\u529b\uff1a<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th class=\"has-text-align-center\" data-align=\"center\">\u9805\u76ee<\/th><th>\u5024<\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u540d\u524d<\/td><td><code>Access-Control-Allow-Origin<\/code><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">\u5024<\/td><td><code>https:\/\/example.com<\/code>\u3000\u203b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u203b <code>*<\/code> \u3092\u6307\u5b9a\u3059\u308b\u3068\u3059\u3079\u3066\u306e\u30aa\u30ea\u30b8\u30f3\u3092\u8a31\u53ef\u3057\u307e\u3059\u304c\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"338\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/iis.jpg\" alt=\"\" class=\"wp-image-1686\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u2463 \u5fc5\u8981\u306b\u5fdc\u3058\u3066\u4ed6\u306eCORS\u30d8\u30c3\u30c0\u30fc\u3082\u8ffd\u52a0<\/strong><\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u3001Cookie\u306a\u3069\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u542b\u3080\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8a31\u53ef\u3059\u308b\u5834\u5408\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u540d\u524d<\/th><th>\u5024<\/th><\/tr><\/thead><tbody><tr><td><code>Access-Control-Allow-Credentials<\/code><\/td><td><code>true<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u2464 \u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u3066\u30c6\u30b9\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u300cOK\u300d\u3067\u4fdd\u5b58\u3057\u3001IIS\u3092\u518d\u8d77\u52d5\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093<\/li>\n\n\n\n<li>\u30d6\u30e9\u30a6\u30b6\u306e\u958b\u767a\u8005\u30c4\u30fc\u30eb\uff08F12\uff09\u3067\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0\u30fc\u306b <code>Access-Control-Allow-Origin<\/code> \u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3067\u304d\u307e\u3059<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"963\" height=\"630\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/response.jpg\" alt=\"\" class=\"wp-image-1685\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8907\u6570\u30aa\u30ea\u30b8\u30f3\u3092\u8a31\u53ef\u3057\u305f\u3044\u5834\u5408<\/h3>\n\n\n\n<p>UI\u304b\u3089\u306f <strong>1\u3064\u306e\u30aa\u30ea\u30b8\u30f3\u3057\u304b\u6307\u5b9a\u3067\u304d\u306a\u3044<\/strong>\u305f\u3081\u3001\u8907\u6570\u5bfe\u5fdc\u306b\u306f\u4ee5\u4e0b\u306e\u3044\u305a\u308c\u304b\u304c\u5fc5\u8981\u3067\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>URL Rewrite \u30e2\u30b8\u30e5\u30fc\u30eb<\/strong>\u3067\u6761\u4ef6\u5206\u5c90\uff08\u524d\u8ff0\u306eXML\u8a2d\u5b9a\uff09<\/li>\n\n\n\n<li><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u5074\u3067\u52d5\u7684\u306b\u30d8\u30c3\u30c0\u30fc\u3092\u8ffd\u52a0<\/strong>\uff08ASP.NET\u306a\u3069\uff09<\/li>\n\n\n\n<li><strong>\u30ab\u30b9\u30bf\u30e0HTTP\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5b9f\u88c5<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u5fc5\u8981\u3067\u3042\u308c\u3070\u3001ASP.NET\u3084PHP\u306a\u3069\u3067\u306e\u52d5\u7684CORS\u5bfe\u5fdc\u65b9\u6cd5\u3082\u3054\u6848\u5185\u3067\u304d\u307e\u3059\u3002\u3069\u306e\u8a00\u8a9e\u30fb\u74b0\u5883\u3067\u904b\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u6559\u3048\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3001\u3055\u3089\u306b\u5177\u4f53\u7684\u306b\u304a\u624b\u4f1d\u3044\u3067\u304d\u307e\u3059\u3088\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IIS CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u8907\u6570\u30aa\u30ea\u30b8\u30f3\u3092\u8a31\u53ef\u3059\u308b\u65b9\u6cd5<\/h3>\n\n\n\n<p><strong>1. Web.config \u306b CORS \u8a2d\u5b9a\u3092\u8ffd\u52a0<\/strong><\/p>\n\n\n\n<p>IIS CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u306f Web.config \u3067\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u8907\u6570\u30aa\u30ea\u30b8\u30f3\u3092\u6761\u4ef6\u4ed8\u304d\u3067\u8a31\u53ef\u3059\u308b\u4f8b\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;configuration>\n  &lt;system.webServer>\n    &lt;cors enabled=\"true\">\n      &lt;add origin=\"https:\/\/example.com\" \/>\n      &lt;add origin=\"https:\/\/anotherdomain.com\" \/>\n    &lt;\/cors>\n  &lt;\/system.webServer>\n&lt;\/configuration><\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001<code>Origin<\/code> \u30d8\u30c3\u30c0\u30fc\u304c <code>https:\/\/example.com<\/code> \u307e\u305f\u306f <code>https:\/\/anotherdomain.com<\/code> \u306e\u5834\u5408\u306b\u9650\u308a\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u306b <code>Access-Control-Allow-Origin<\/code> \u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>2. IIS CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u52d5\u4f5c\u30dd\u30a4\u30f3\u30c8<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30ea\u30af\u30a8\u30b9\u30c8\u306e Origin \u3092\u81ea\u52d5\u5224\u5b9a<\/strong>\u3057\u3001Web.config \u306b\u4e00\u81f4\u3059\u308b\u5834\u5408\u306e\u307f\u8a31\u53ef<\/li>\n\n\n\n<li><code>Access-Control-Allow-Origin<\/code> \u306f <strong>\u4e00\u81f4\u3057\u305f1\u3064\u306e\u30aa\u30ea\u30b8\u30f3\u306e\u307f<\/strong>\u304c\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u51fa\u529b\u3055\u308c\u308b<\/li>\n\n\n\n<li><code>*<\/code>\uff08\u30ef\u30a4\u30eb\u30c9\u30ab\u30fc\u30c9\uff09\u306f\u4f7f\u3048\u307e\u305b\u3093\uff08IIS CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u975e\u5bfe\u5fdc\uff09<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>3.  \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306a\u5834\u5408\uff09<\/strong><\/p>\n\n\n\n<p>IIS CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u306f Windows Server \u306b\u6a19\u6e96\u3067\u306f\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u4e0b\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u3067\u3059\uff1a<\/p>\n\n\n\n<p>IIS \u306b Microsoft CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u65b9\u6cd5\u304c\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u2460\uff1aIIS \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u78ba\u8a8d<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>IIS \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3092\u8d77\u52d5<\/strong>\n<ul class=\"wp-block-list\">\n<li>Windows\u30ad\u30fc \u2192 \u300cIIS\u300d\u307e\u305f\u306f\u300c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 \u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3 \u30b5\u30fc\u30d3\u30b9\uff08IIS\uff09\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u300d<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5bfe\u8c61\u306e\u30b5\u30a4\u30c8\u307e\u305f\u306f\u30b5\u30fc\u30d0\u30fc\u3092\u9078\u629e<\/strong><\/li>\n\n\n\n<li><strong>\u4e2d\u592e\u30da\u30a4\u30f3\u306e\u300c\u6a5f\u80fd\u30d3\u30e5\u30fc\u300d\u306b CORS \u95a2\u9023\u306e\u9805\u76ee\u304c\u3042\u308b\u304b\u78ba\u8a8d<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>CORS<\/code> \u3068\u3044\u3046\u540d\u524d\u306e\u30a2\u30a4\u30b3\u30f3\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u2461\uff1aPowerShell \u3067\u78ba\u8a8d<\/strong><\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092 PowerShell \u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306e IIS \u30e2\u30b8\u30e5\u30fc\u30eb\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-WebGlobalModule<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u4e2d\u306b <code>CorsModule<\/code> \u304c\u542b\u307e\u308c\u3066\u3044\u308c\u3070\u3001CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u2462\uff1a<code>%windir%\\System32\\inetsrv<\/code> \u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u78ba\u8a8d<\/strong><\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306e DLL \u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308c\u3070\u3001CORS \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\uff1a<\/p>\n\n\n\n<p>Microsoft.IIS.CORS.dll<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u65b9\u6cd5\u2463\uff1aWeb.config \u306b \u30bb\u30af\u30b7\u30e7\u30f3\u304c\u4f7f\u3048\u308b\u304b\u78ba\u8a8d<\/strong><\/p>\n\n\n\n<p>Web.config \u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3057\u3066\u3001IIS\u304c\u30a8\u30e9\u30fc\u3092\u51fa\u3055\u305a\u306b\u8aad\u307f\u8fbc\u3081\u308b\u304b\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<p>\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u5834\u5408\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u672a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"> IIS CORS\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408<\/h3>\n\n\n\n<p>Microsoft\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.iis.net\/downloads\/microsoft\/iis-cors-module\">IIS CORS Module \u2013 Microsoft\u516c\u5f0f<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306f\u3001IIS\u3092\u518d\u8d77\u52d5\u3057\u3066\u6709\u52b9\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u300cCORS\u300d\u306f\u82f1\u8a9e\u3067\u306f\u901a\u5e38\u3001\u300c\u30b3\u30fc\u30ba\u300d\uff08\/k\u0254\u02d0rz\/\uff09\u3068\u767a\u97f3\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IIS CORS Module\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"347\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/cors1.jpg\" alt=\"\" class=\"wp-image-1687\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"390\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/cors2.jpg\" alt=\"\" class=\"wp-image-1688\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"491\" height=\"391\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/cors3.jpg\" alt=\"\" class=\"wp-image-1689\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"408\" height=\"21\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/cors4.jpg\" alt=\"\" class=\"wp-image-1690\"\/><\/figure>\n\n\n\n<p>Powershell\u3067\u78ba\u8a8d<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"697\" src=\"https:\/\/www.ambulo.tv\/blog\/wp-content\/uploads\/2025\/09\/image-2.png\" alt=\"\" class=\"wp-image-1695\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cross-Origin Resource Sharing\uff08CORS\uff09\u3068\u306f\uff1f<\/h3>\n\n\n\n<p>Cross-Origin Resource Sharing\uff08CORS\uff09\u3068\u306f\u3001<strong>\u7570\u306a\u308b\u30aa\u30ea\u30b8\u30f3\uff08\u30c9\u30e1\u30a4\u30f3\u3001\u30dd\u30fc\u30c8\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\uff09\u9593\u3067\u306e\u5b89\u5168\u306a\u30ea\u30bd\u30fc\u30b9\u5171\u6709\u3092\u53ef\u80fd\u306b\u3059\u308b\u4ed5\u7d44\u307f<\/strong>\u3067\u3059\u3002\u4e3b\u306b <strong>Web\u30d6\u30e9\u30a6\u30b6\u3068\u30b5\u30fc\u30d0\u30fc\u9593\u306e\u901a\u4fe1\u306b\u304a\u3044\u3066\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5236\u7d04\u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306e\u6a19\u6e96\u4ed5\u69d8<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u306a\u305cCORS\u304c\u5fc5\u8981\u306a\u306e\u304b\uff1f<\/strong><\/p>\n\n\n\n<p>\u901a\u5e38\u3001Web\u30d6\u30e9\u30a6\u30b6\u306f\u300c\u540c\u4e00\u30aa\u30ea\u30b8\u30f3\u30dd\u30ea\u30b7\u30fc\u300d\u306b\u5f93\u3044\u3001<strong>\u7570\u306a\u308b\u30aa\u30ea\u30b8\u30f3\u306e\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u5236\u9650<\/strong>\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u3067\u3001\u60aa\u610f\u3042\u308b\u30b5\u30a4\u30c8\u304c\u30e6\u30fc\u30b6\u30fc\u306e\u60c5\u5831\u306b\u52dd\u624b\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001\u73fe\u4ee3\u306eWeb\u30a2\u30d7\u30ea\u3067\u306f\u3001API\u30b5\u30fc\u30d0\u30fc\u3068\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u304c\u5225\u30c9\u30e1\u30a4\u30f3\u3067\u52d5\u4f5c\u3059\u308b\u3053\u3068\u304c\u591a\u304f\u3001<strong>\u6b63\u5f53\u306a\u7406\u7531\u3067\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u901a\u4fe1\u304c\u5fc5\u8981\u306b\u306a\u308b<\/strong>\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u767b\u5834\u3059\u308b\u306e\u304cCORS\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>CORS\u306e\u4ed5\u7d44\u307f<\/strong><\/p>\n\n\n\n<p>CORS\u3067\u306f\u3001<strong>\u30b5\u30fc\u30d0\u30fc\u5074\u304cHTTP\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0\u30fc\u3067\u660e\u793a\u7684\u306b\u8a31\u53ef\u3059\u308b\u3053\u3068\u3067\u3001\u30d6\u30e9\u30a6\u30b6\u304c\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u901a\u4fe1\u3092\u8a31\u53ef<\/strong>\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e3b\u306a\u30ec\u30b9\u30dd\u30f3\u30b9\u30d8\u30c3\u30c0\u30fc\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30d8\u30c3\u30c0\u30fc\u540d<\/th><th>\u5f79\u5272<\/th><\/tr><\/thead><tbody><tr><td><code>Access-Control-Allow-Origin<\/code><\/td><td>\u8a31\u53ef\u3059\u308b\u30aa\u30ea\u30b8\u30f3\u3092\u6307\u5b9a\uff08\u4f8b:<code>https:\/\/example.com<\/code>)<\/td><\/tr><tr><td><code>Access-Control-Allow-Methods<\/code><\/td><td>\u8a31\u53ef\u3059\u308bHTTP\u30e1\u30bd\u30c3\u30c9\uff08\u4f8b<code>GET<\/code><code>POST<\/code>)<\/td><\/tr><tr><td><code>Access-Control-Allow-Headers<\/code><\/td><td>\u8a31\u53ef\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30d8\u30c3\u30c0\u30fc<\/td><\/tr><tr><td><code>Access-Control-Allow-Credentials<\/code><\/td><td>Cookie\u306a\u3069\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u8a31\u53ef\u3059\u308b\u304b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u30d7\u30ea\u30d5\u30e9\u30a4\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u3068\u306f\uff1f<\/strong><\/p>\n\n\n\n<p>\u7279\u5b9a\u306e\u6761\u4ef6\uff08\u4f8b: <code>PUT<\/code>\u30e1\u30bd\u30c3\u30c9\u3084\u30ab\u30b9\u30bf\u30e0\u30d8\u30c3\u30c0\u30fc\u4f7f\u7528\uff09\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306f\u672c\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u524d\u306b <strong>OPTIONS\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308b\u300c\u30d7\u30ea\u30d5\u30e9\u30a4\u30c8\u30ea\u30af\u30a8\u30b9\u30c8\u300d<\/strong> \u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u304cCORS\u3092\u8a31\u53ef\u3057\u3066\u3044\u308b\u304b\u3092\u4e8b\u524d\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>CORS\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u7de9\u3081\u308b\u306e\u3067\u306f\u306a\u304f\u300c\u5236\u5fa1\u3059\u308b\u300d<\/strong><\/p>\n\n\n\n<p>CORS\u306f\u5358\u306a\u308b\u5236\u9650\u89e3\u9664\u3067\u306f\u306a\u304f\u3001<strong>\u30b5\u30fc\u30d0\u30fc\u304c\u660e\u793a\u7684\u306b\u300c\u3053\u306e\u30aa\u30ea\u30b8\u30f3\u304b\u3089\u306e\u30a2\u30af\u30bb\u30b9\u306f\u8a31\u53ef\u3059\u308b\u300d\u3068\u5ba3\u8a00\u3059\u308b\u3053\u3068\u3067\u3001\u5b89\u5168\u306b\u5236\u5fa1\u3055\u308c\u305f\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3\u901a\u4fe1\u3092\u5b9f\u73fe<\/strong>\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3057\u3001\u5177\u4f53\u7684\u306aCORS\u8a2d\u5b9a\u4f8b\uff08IIS\u3001Apache\u3001Node.js\u306a\u3069\uff09\u3084\u3001\u30d7\u30ea\u30d5\u30e9\u30a4\u30c8\u306e\u6319\u52d5\u3092\u30b3\u30fc\u30c9\u4ed8\u304d\u3067\u898b\u305f\u3044\u5834\u5408\u306f\u3001\u305d\u3061\u3089\u3082\u3054\u6848\u5185\u3067\u304d\u307e\u3059\u3088\u3002\u3069\u306e\u74b0\u5883\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u6559\u3048\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3001\u3055\u3089\u306b\u6df1\u6398\u308a\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Access-Control-Allow-Origin \u30d8\u30c3&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54,36],"tags":[],"class_list":["post-1684","post","type-post","status-publish","format-standard","hentry","category-windows","category-computing","article","has-background","has-excerpt","has-avatar","has-author","has-date","has-comment-count","has-category-meta","has-read-more","thumbnail-"],"_links":{"self":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1684"}],"collection":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/comments?post=1684"}],"version-history":[{"count":7,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1684\/revisions"}],"predecessor-version":[{"id":1698,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1684\/revisions\/1698"}],"wp:attachment":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/media?parent=1684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/categories?post=1684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/tags?post=1684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}