{"id":38590,"date":"2024-11-01T18:18:29","date_gmt":"2024-11-01T18:18:29","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38590"},"modified":"2024-11-26T06:43:54","modified_gmt":"2024-11-26T06:43:54","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-cors-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38590\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815"},"content":{"rendered":"<p><body><\/p>\n<p>FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 Python \uae30\ubc18\uc758 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \uc774 \ud504\ub808\uc784\uc6cc\ud06c\ub294 \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ub370\uc774\ud130 \uac80\uc99d, \uc790\ub3d9 \ubb38\uc11c\ud654 \ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \ub9c8\uc8fc\uce60 \uc218 \uc788\ub294 CORS(Cross-Origin Resource Sharing) \uc124\uc815\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \ub2e4\uc591\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8(\uc6f9 \ube0c\ub77c\uc6b0\uc800 \ub4f1)\uc5d0\uc11c API\ub97c \uc548\uc804\ud558\uac8c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>CORS\ub780 \ubb34\uc5c7\uc778\uac00?<\/h2>\n<p>CORS(Cross-Origin Resource Sharing)\ub294 \uc6f9 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c \uc11c\ub85c \ub2e4\ub978 \ucd9c\ucc98(origin)\uc5d0\uc11c \ub9ac\uc18c\uc2a4\ub97c \uc694\uccad\ud560 \uc218 \uc788\uac8c \ud558\ub294 \ubcf4\uc548 \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \ub9cc\uc57d <code>http:\/\/example.com<\/code>\uc5d0\uc11c \ud638\uc2a4\ud305\ub418\ub294 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 <code>http:\/\/api.example.com<\/code>\uc73c\ub85c \uc694\uccad\uc744 \ubcf4\ub0bc \uacbd\uc6b0, \ub450 URL\uc758 \ucd9c\ucc98\uac00 \ub2e4\ub974\uae30 \ub54c\ubb38\uc5d0 \uae30\ubcf8\uc801\uc73c\ub85c \ucc28\ub2e8\ub429\ub2c8\ub2e4. \uc774\ub97c \ud574\uacb0\ud558\uae30 \uc704\ud574 CORS\ub97c \uc124\uc815\ud558\uc5ec \ud2b9\uc815 \ucd9c\ucc98\uc5d0\uc11c API\ub97c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud5c8\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>CORS\uc758 \ud544\uc694\uc131<\/h3>\n<p>CORS\ub294 \ubcf4\uc548\uc0c1\uc758 \uc774\uc720\ub85c \uad6c\ud604\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \uc2a4\uc2a4\ub85c \ubaa8\ub974\ub294 \uc0ac\uc774\uc5d0 \uc545\uc131 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \ub2e4\ub978 \ub3c4\uba54\uc778\uc5d0 \uc788\ub294 \ub370\uc774\ud130\uc5d0 \uc811\uadfc\ud558\ub294 \uac83\uc744 \ubc29\uc9c0\ud558\uae30 \uc704\ud568\uc785\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\ub294 \uc5ec\ub7ec \uc11c\ube44\uc2a4\uc640 \uc0c1\ud638\uc791\uc6a9\uc744 \uc704\ud574 \ub2e4\ub978 \ucd9c\ucc98\uc640 \uc5f0\uacb0\ud560 \ud544\uc694\uac00 \uc788\uc2b5\ub2c8\ub2e4. \ub530\ub77c\uc11c, \uc62c\ubc14\ub978 CORS \uc815\ucc45\uc744 \uc124\uc815\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4.<\/p>\n<h2>FastAPI\uc5d0\uc11c CORS \uc124\uc815\ud558\uae30<\/h2>\n<p>FastAPI\uc5d0\uc11c\ub294 <code>fastapi.middleware.cors<\/code> \ubaa8\ub4c8\uc758 <code>CORSMiddleware<\/code> \ud074\ub798\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc27d\uac8c CORS \uc815\ucc45\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc758 \ub2e8\uacc4\ub97c \ud1b5\ud574 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 CORS\ub97c \ucd94\uac00\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>1. FastAPI \uc124\uce58\ud558\uae30<\/h3>\n<p>FastAPI \ubc0f \uae30\ud0c0 \ud544\uc694\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc6b0\uc120 \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4. \uc544\ub798\uc758 \uba85\ub839\uc5b4\ub97c \ud130\ubbf8\ub110\uc5d0 \uc785\ub825\ud558\uc5ec FastAPI\uc640 uvicorn\uc744 \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>pip install fastapi uvicorn<\/code><\/pre>\n<h3>2. \uae30\ubcf8 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uc0dd\uc131\ud558\uae30<\/h3>\n<p>\uc544\ub798\uc758 \ucf54\ub4dc\ub294 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac04\ub2e8\ud788 \uc124\uc815\ud558\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>from fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"message\": \"Hello, FastAPI!\"}<\/code><\/pre>\n<h3>3. CORS \ubbf8\ub4e4\uc6e8\uc5b4 \ucd94\uac00\ud558\uae30<\/h3>\n<p>CORS\ub97c \uc124\uc815\ud558\uae30 \uc704\ud574 <code>CORSMiddleware<\/code>\ub97c FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \ucd94\uac00\ud569\ub2c8\ub2e4. `allow_origins` \ub9e4\uac1c\ubcc0\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud5c8\uc6a9\ud560 \ucd9c\ucc98\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>from fastapi import FastAPI\nfrom fastapi.middleware.cors import CORSMiddleware\n\napp = FastAPI()\n\n# CORS \uc124\uc815\norigins = [\n    \"http:\/\/localhost:3000\",\n    \"https:\/\/myfrontend.com\",\n]\n\napp.add_middleware(\n    CORSMiddleware,\n    allow_origins=origins,  # \ud5c8\uc6a9\ud560 \ucd9c\ucc98\n    allow_credentials=True,\n    allow_methods=[\"*\"],  # \ud5c8\uc6a9\ud560 HTTP \uba54\uc11c\ub4dc\n    allow_headers=[\"*\"],  # \ud5c8\uc6a9\ud560 \ud5e4\ub354\n)\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"message\": \"Hello, FastAPI!\"}<\/code><\/pre>\n<h3>4. CORS \uc124\uc815 \uc635\uc158 \uc124\uba85\ud558\uae30<\/h3>\n<ul>\n<li><strong>allow_origins:<\/strong> \uc694\uccad\uc744 \ud5c8\uc6a9\ud560 \ucd9c\ucc98\ub97c \uba85\uc2dc\ud569\ub2c8\ub2e4. \ub3c4\uba54\uc778 \uc774\ub984\uc774\ub098 \uc640\uc77c\ub4dc\uce74\ub4dc(<code>*<\/code>)\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>allow_credentials:<\/strong> \ucfe0\ud0a4 \ubc0f \uc778\uc99d \uc815\ubcf4\ub97c \ud3ec\ud568\ud55c \uc694\uccad\uc744 \ud5c8\uc6a9\ud560\uc9c0 \uc5ec\ubd80\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>allow_methods:<\/strong> \ud5c8\uc6a9\ud560 HTTP \uba54\uc11c\ub4dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \uae30\ubcf8\uac12\uc740 GET, POST\uc785\ub2c8\ub2e4.<\/li>\n<li><strong>allow_headers:<\/strong> \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uc694\uccad\ud560 \uc218 \uc788\ub294 \ud5e4\ub354\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>5. \ub2e4\uc591\ud55c \ud658\uacbd\uc5d0\uc11c\uc758 CORS \uc124\uc815 \uc608\uc81c<\/h2>\n<p>\uac1c\ubc1c \ud658\uacbd, \ud14c\uc2a4\ud2b8 \ud658\uacbd, \uc6b4\uc601 \ud658\uacbd\uc5d0 \ub530\ub77c CORS \uc124\uc815\uc744 \ub2e4\ub974\uac8c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uac1c\ubc1c \ud658\uacbd\uc5d0\uc11c\ub294 \ub85c\uceec \ucd9c\ucc98\ub9cc\uc744 \ud5c8\uc6a9\ud558\uace0, \uc6b4\uc601 \ud658\uacbd\uc5d0\uc11c\ub294 \uc5ec\ub7ec \ub3c4\uba54\uc778\uc744 \ud5c8\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uc0c1\ud669\uc5d0 \ub530\ub77c \ub2e4\ub974\uac8c \uc124\uc815\ud558\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>import os\nfrom fastapi import FastAPI\nfrom fastapi.middleware.cors import CORSMiddleware\n\napp = FastAPI()\n\n# \ud658\uacbd\uc5d0 \ub530\ub77c CORS \uc124\uc815\uc744 \ubcc0\uacbd\nif os.getenv(\"ENV\") == \"production\":\n    origins = [\n        \"https:\/\/myfrontend.com\",\n        \"https:\/\/anotherdomain.com\",\n    ]\nelse:\n    origins = [\n        \"http:\/\/localhost:3000\",\n    ]\n\napp.add_middleware(\n    CORSMiddleware,\n    allow_origins=origins,\n    allow_credentials=True,\n    allow_methods=[\"*\"],\n    allow_headers=[\"*\"],\n)\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"message\": \"Hello, FastAPI!\"}<\/code><\/pre>\n<h2>6. CORS \uad00\ub828 \ubb38\uc81c \ud574\uacb0\ud558\uae30<\/h2>\n<p>CORS \uc124\uc815\uc744 \uc81c\ub300\ub85c \ud574\ub3c4 \uac00\ub054 \uc6d0\ud558\ub294 \ub300\ub85c \ub3d9\uc791\ud558\uc9c0 \uc54a\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub54c \ud655\uc778\ud574\uc57c \ud560 \uba87 \uac00\uc9c0 \uc0ac\ud56d\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<ul>\n<li><strong>\ube0c\ub77c\uc6b0\uc800 \ucf58\uc194 \ub85c\uadf8:<\/strong> \ube0c\ub77c\uc6b0\uc800\uc758 \uac1c\ubc1c\uc790 \ub3c4\uad6c\ub97c \uc5f4\uace0, \ucf58\uc194 \ud0ed\uc5d0\uc11c CORS \uad00\ub828 \uc5d0\ub7ec \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uc11c\ubc84 \ub85c\uadf8:<\/strong> FastAPI \uc11c\ubc84\uc758 \ub85c\uadf8 \ud30c\uc77c\uc744 \uc810\uac80\ud558\uc5ec \uc694\uccad\uc774 \uc11c\ubc84\uc5d0 \ub3c4\ub2ec\ud588\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ub124\ud2b8\uc6cc\ud06c \uc694\uccad \ud655\uc778:<\/strong> \uac1c\ubc1c\uc790 \ub3c4\uad6c\uc758 \ub124\ud2b8\uc6cc\ud06c \ud0ed\uc5d0\uc11c \uc694\uccad \ud5e4\ub354\uc640 \uc751\ub2f5 \ud5e4\ub354\ub97c \ubd84\uc11d\ud558\uc5ec \ubb38\uc81c\ub97c \ud30c\uc545\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>\uacb0\ub860<\/h2>\n<p>FastAPI\ub294 CORS \uc124\uc815\uc744 \ud1b5\ud574 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uacfc API \uac04\uc758 \uc548\uc804\ud55c \ud1b5\uc2e0\uc744 \uac00\ub2a5\ud558\uac8c \ud569\ub2c8\ub2e4. \uc62c\ubc14\ub978 CORS \uc815\ucc45\uc744 \uc124\uc815\ud558\uc5ec \ub2e4\uc591\ud55c \ucd9c\ucc98\uc758 \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 API\ub97c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c \uc124\uba85\ud55c \ub0b4\uc6a9\uc744 \ud1b5\ud574 FastAPI\uc5d0\uc11c CORS\ub97c \uac04\ub2e8\ud558\uac8c \uc124\uc815\ud558\uace0 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub418\uae38 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 Python \uae30\ubc18\uc758 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \uc774 \ud504\ub808\uc784\uc6cc\ud06c\ub294 \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ub370\uc774\ud130 \uac80\uc99d, \uc790\ub3d9 \ubb38\uc11c\ud654 \ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \ub9c8\uc8fc\uce60 \uc218 \uc788\ub294 CORS(Cross-Origin Resource Sharing) \uc124\uc815\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \ub2e4\uc591\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8(\uc6f9 \ube0c\ub77c\uc6b0\uc800 \ub4f1)\uc5d0\uc11c API\ub97c \uc548\uc804\ud558\uac8c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. CORS\ub780 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38590\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[183],"tags":[],"class_list":["post-38590","post","type-post","status-publish","format-standard","hentry","category-fastapi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/38590\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 Python \uae30\ubc18\uc758 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \uc774 \ud504\ub808\uc784\uc6cc\ud06c\ub294 \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ub370\uc774\ud130 \uac80\uc99d, \uc790\ub3d9 \ubb38\uc11c\ud654 \ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \ub9c8\uc8fc\uce60 \uc218 \uc788\ub294 CORS(Cross-Origin Resource Sharing) \uc124\uc815\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \ub2e4\uc591\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8(\uc6f9 \ube0c\ub77c\uc6b0\uc800 \ub4f1)\uc5d0\uc11c API\ub97c \uc548\uc804\ud558\uac8c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. CORS\ub780 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38590\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:18:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:43:54+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815\",\"datePublished\":\"2024-11-01T18:18:29+00:00\",\"dateModified\":\"2024-11-26T06:43:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/\"},\"wordCount\":65,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38590\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:18:29+00:00\",\"dateModified\":\"2024-11-26T06:43:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38590\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38590\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/38590\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 Python \uae30\ubc18\uc758 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \uc774 \ud504\ub808\uc784\uc6cc\ud06c\ub294 \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ub370\uc774\ud130 \uac80\uc99d, \uc790\ub3d9 \ubb38\uc11c\ud654 \ub4f1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \ub9c8\uc8fc\uce60 \uc218 \uc788\ub294 CORS(Cross-Origin Resource Sharing) \uc124\uc815\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uace0, \uc774\ub97c \ud1b5\ud574 \ub2e4\uc591\ud55c \ud074\ub77c\uc774\uc5b8\ud2b8(\uc6f9 \ube0c\ub77c\uc6b0\uc800 \ub4f1)\uc5d0\uc11c API\ub97c \uc548\uc804\ud558\uac8c \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \ud558\ub294 \ubc29\ubc95\uc744 \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. CORS\ub780 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815\"","og_url":"https:\/\/atmokpo.com\/w\/38590\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:18:29+00:00","article_modified_time":"2024-11-26T06:43:54+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/38590\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38590\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815","datePublished":"2024-11-01T18:18:29+00:00","dateModified":"2024-11-26T06:43:54+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38590\/"},"wordCount":65,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38590\/","url":"https:\/\/atmokpo.com\/w\/38590\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:18:29+00:00","dateModified":"2024-11-26T06:43:54+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38590\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38590\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38590\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, CORS \uc124\uc815"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=38590"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38590\/revisions"}],"predecessor-version":[{"id":38591,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38590\/revisions\/38591"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}