{"id":528,"date":"2025-10-03T07:23:02","date_gmt":"2025-10-03T00:23:02","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/atlasx-api-gateway\/features\/connect-to-storage\/"},"modified":"2025-11-12T16:04:11","modified_gmt":"2025-11-12T09:04:11","slug":"arcgis-proxy","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/axgw\/features\/arcgis-proxy\/","title":{"rendered":"ArcGIS Proxy"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"arcgis-proxy\">ArcGIS Proxy<\/h1>\n\n\n\n<p>\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48\u0e02\u0e2d\u0e07&nbsp;<a href=\"https:\/\/github.com\/Esri\/resource-proxy\" target=\"_blank\" rel=\"noreferrer noopener\">resource proxy<\/a>&nbsp;\u0e19\u0e34\u0e22\u0e32\u0e21\u0e44\u0e27\u0e49\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e17\u0e23\u0e31\u0e1e\u0e22\u0e32\u0e01\u0e23\u0e02\u0e49\u0e32\u0e21\u0e42\u0e14\u0e40\u0e21\u0e19 (CORS)<\/li>\n\n\n\n<li>\u0e2a\u0e48\u0e07 Request \u0e17\u0e35\u0e48\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e22\u0e32\u0e27\u0e40\u0e01\u0e34\u0e19 2048 \u0e15\u0e31\u0e27\u0e2d\u0e31\u0e01\u0e29\u0e23 \u0e2b\u0e23\u0e37\u0e2d Request \u0e41\u0e1a\u0e1a POST \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e2a\u0e48\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e33\u0e19\u0e27\u0e19\u0e21\u0e32\u0e01<\/li>\n\n\n\n<li>\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 Secure Map Service \u0e14\u0e49\u0e27\u0e22 Token Based Authentication<\/li>\n<\/ul>\n\n\n\n<p>AtlasX API Gateway \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e40\u0e1b\u0e47\u0e19 ArcGIS Proxy \u0e44\u0e14\u0e49 \u0e42\u0e14\u0e22\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e44\u0e14\u0e49\u0e17\u0e35\u0e48\u0e44\u0e1f\u0e25\u0e4c Configurations\/ArcGisProxy\/arcgis-proxy.[Environment].json \u0e15\u0e32\u0e21 Environment \u0e17\u0e35\u0e48\u0e04\u0e38\u0e13\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 (\u0e42\u0e14\u0e22 config \u0e02\u0e2d\u0e07 Production \u0e08\u0e30\u0e44\u0e21\u0e48\u0e21\u0e35 .[Environment]) \u0e41\u0e2a\u0e14\u0e07\u0e44\u0e14\u0e49\u0e14\u0e31\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"Proxy\": {\n    \"Path\": \"\/arcgis-proxy\",\n    \"TokenPath\": \"\/arcgis-token\",\n    \"AllowedReferers\": &#91;\n      \/\/ \"*\",\n      \"http:\/\/localhost\", \/\/ For local development only\n      \"https:\/\/portal-atlasx.cdg.co.th\"\n    &#93;\n  },\n  \"ArcGIS\": &#91;\n    \/\/ Public services (No authentication required)\n    {\n      \"Url\": \"https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services\"\n    },\n    \/\/ ArcGIS Enterprise - Token-based authentication\n    {\n      \"Url\": \"https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Admin\/MapServer\",\n      \"Username\": \"admin\",\n      \"Password\": \"adminpass\"\n    },\n    ...\n    \/\/ ArcGIS Online - organization-specific subdomain\n    {\n      \"Host\": \"yourorg.maps.arcgis.com\",\n      \"ClientId\": \"your-client-id\",\n      \"ClientSecret\": \"your-client-secret\",\n      \"OAuth2TokenEndpoint\": \"https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token\"\n    }\n  &#93;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;Proxy&quot;<\/span><span style=\"color: #000000\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #A31515\">&quot;Path&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;\/arcgis-proxy&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #A31515\">&quot;TokenPath&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;\/arcgis-token&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #A31515\">&quot;AllowedReferers&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #008000\">\/\/ &quot;*&quot;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;http:\/\/localhost&quot;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #008000\">\/\/ For local development only<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;https:\/\/portal-atlasx.cdg.co.th&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;ArcGIS&quot;<\/span><span style=\"color: #000000\">: &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ Public services (No authentication required)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Url&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Enterprise - Token-based authentication<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Url&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Admin\/MapServer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Username&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;admin&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Password&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;adminpass&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Online - organization-specific subdomain<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;yourorg.maps.arcgis.com&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientId&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;your-client-id&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientSecret&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;your-client-secret&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;OAuth2TokenEndpoint&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19\">\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19<\/h2>\n\n\n\n<p>\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e1e\u0e37\u0e49\u0e19\u0e10\u0e32\u0e19\u0e02\u0e2d\u0e07 ArcGIS Proxy \u0e20\u0e32\u0e22\u0e43\u0e15\u0e49 Object&nbsp;<strong>Proxy<\/strong>&nbsp;\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e41\u0e15\u0e48\u0e25\u0e30 Property \u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Path<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38\u0e0a\u0e37\u0e48\u0e2d path \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e43\u0e0a\u0e49\u0e40\u0e1b\u0e47\u0e19 Proxy (default: \/arcgis-proxy)<\/li>\n\n\n\n<li><code>TokenPath<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38\u0e0a\u0e37\u0e48\u0e2d path \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e02\u0e2d ArcGIS Token \u0e40\u0e1e\u0e37\u0e48\u0e2d Authenticate (default: \/arcgis-token)<\/li>\n\n\n\n<li><code>AllowedReferers<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 URL \u0e02\u0e2d\u0e07 Referer \u0e17\u0e35\u0e48\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e43\u0e2b\u0e49\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 ArcGIS Proxy \u0e44\u0e14\u0e49 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e2a\u0e48 &#8220;*&#8221; \u0e40\u0e1e\u0e37\u0e48\u0e2d allow \u0e17\u0e38\u0e01 Host \u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e01\u0e44\u0e14\u0e49 (\u0e44\u0e21\u0e48\u0e41\u0e19\u0e30\u0e19\u0e33\u0e43\u0e2b\u0e49\u0e17\u0e33\u0e1a\u0e19 Production)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32-server-\u0e15\u0e48\u0e32\u0e07\u0e46\">\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 Server \u0e15\u0e48\u0e32\u0e07\u0e46<\/h2>\n\n\n\n<p>\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e30\u0e1a\u0e38\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 Map Server \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e44\u0e14\u0e49\u0e1c\u0e48\u0e32\u0e19 Proxy \u0e20\u0e32\u0e22\u0e43\u0e15\u0e49 Array &#8220;ArcGIS&#8221; \u0e0b\u0e36\u0e48\u0e07\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 2 \u0e25\u0e31\u0e01\u0e29\u0e13\u0e30\u0e43\u0e2b\u0e0d\u0e48\u0e46 \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>ArcGIS Enterprise \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 REST Services \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e1a\u0e19 ArcGIS Server \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07\u0e41\u0e1a\u0e1a Token-based (\u0e43\u0e0a\u0e49 Username\/Password) \u0e42\u0e14\u0e22 property \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e23\u0e30\u0e1a\u0e38\u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Url<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 URL \u0e02\u0e2d\u0e07 Map Server \u0e21\u0e31\u0e01\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a https:\/\/[domain]\/arcgis\/rest\/services<\/li>\n\n\n\n<li><code>Username<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 Username \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 Map Server ** \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e25\u0e30\u0e44\u0e27\u0e49\u0e44\u0e14\u0e49\u0e16\u0e49\u0e32\u0e40\u0e1b\u0e47\u0e19 Public Service<\/li>\n\n\n\n<li><code>Password<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 Password \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 Map Server ** \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e25\u0e30\u0e44\u0e27\u0e49\u0e44\u0e14\u0e49\u0e16\u0e49\u0e32\u0e40\u0e1b\u0e47\u0e19 Public Service<\/li>\n<\/ul>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  ...\n  \"ArcGIS\": &#91;\n    \/\/ Public services (No authentication required)\n    {\n      \"Url\": \"https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services\"\n    },\n    \/\/ ArcGIS Enterprise - Token-based authentication\n    {\n      \"Url\": \"https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Admin\/MapServer\",\n      \"Username\": \"admin\",\n      \"Password\": \"adminpass\"\n    },\n    {\n      \"Url\": \"https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Viewer\/MapServer\",\n      \"Username\": \"viewer\",\n      \"Password\": \"viewerpass\"\n    },\n    ...\n  &#93;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;ArcGIS&quot;<\/span><span style=\"color: #000000\">: &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ Public services (No authentication required)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Url&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Enterprise - Token-based authentication<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Url&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Admin\/MapServer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Username&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;admin&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Password&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;adminpass&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Url&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Viewer\/MapServer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Username&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;viewer&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Password&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;viewerpass&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>OAuth2 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 Service \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e1a\u0e19 ArcGIS Online \u0e2b\u0e23\u0e37\u0e2d ArcGIS Enterprise \u0e02\u0e2d\u0e07\u0e2d\u0e07\u0e04\u0e4c\u0e01\u0e23 \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 Client ID \u0e41\u0e25\u0e30 Secret \u0e42\u0e14\u0e22 property \u0e15\u0e48\u0e32\u0e07\u0e46 \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e23\u0e30\u0e1a\u0e38\u0e21\u0e35\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Host<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 URL \u0e02\u0e2d\u0e07 ArcGIS Online \u0e2b\u0e23\u0e37\u0e2d ArcGIS Enterprise<\/li>\n\n\n\n<li><code>ClientId<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 Client ID<\/li>\n\n\n\n<li><code>ClientSecret<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 Secret<\/li>\n\n\n\n<li><code>OAuth2TokenEndpoint<\/code>\u00a0: \u0e23\u0e30\u0e1a\u0e38 URL \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e02\u0e2d OAuth2 Token<\/li>\n<\/ul>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  ...\n  \"ArcGIS\": &#91;\n    \/\/ ArcGIS Enterprise - OAuth2\n    {\n      \"Host\": \"enterprise1.example.com\",\n      \"ClientId\": \"client-id\",\n      \"ClientSecret\": \"client-secret\",\n      \"OAuth2TokenEndpoint\": \"https:\/\/enterprise1.example.com\/portal\/sharing\/rest\/oauth2\/token\"\n    },\n    \/\/ ArcGIS Online (www.arcgis.com) - multiple apps\n    {\n      \"Host\": \"www.arcgis.com\",\n      \"ClientId\": \"client-id-1\",\n      \"ClientSecret\": \"client-secret-1\",\n      \"OAuth2TokenEndpoint\": \"https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token\"\n    },\n    {\n      \"Host\": \"www.arcgis.com\",\n      \"ClientId\": \"client-id-2\",\n      \"ClientSecret\": \"client-secret-2\",\n      \"OAuth2TokenEndpoint\": \"https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token\"\n    },\n    \/\/ ArcGIS Online - organization-specific subdomain\n    {\n      \"Host\": \"yourorg.maps.arcgis.com\",\n      \"ClientId\": \"your-client-id\",\n      \"ClientSecret\": \"your-client-secret\",\n      \"OAuth2TokenEndpoint\": \"https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token\"\n    }\n    ...\n  &#93;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;ArcGIS&quot;<\/span><span style=\"color: #000000\">: &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Enterprise - OAuth2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;enterprise1.example.com&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientId&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-id&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientSecret&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-secret&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;OAuth2TokenEndpoint&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/enterprise1.example.com\/portal\/sharing\/rest\/oauth2\/token&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Online (www.arcgis.com) - multiple apps<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;www.arcgis.com&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientId&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-id-1&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientSecret&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-secret-1&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;OAuth2TokenEndpoint&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;www.arcgis.com&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientId&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-id-2&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientSecret&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;client-secret-2&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;OAuth2TokenEndpoint&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #008000\">\/\/ ArcGIS Online - organization-specific subdomain<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;Host&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;yourorg.maps.arcgis.com&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientId&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;your-client-id&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;ClientSecret&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;your-client-secret&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;OAuth2TokenEndpoint&quot;<\/span><span style=\"color: #001080\">:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;https:\/\/www.arcgis.com\/sharing\/rest\/oauth2\/token&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19-arcgis-proxy\">\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 ArcGIS Proxy<\/h2>\n\n\n\n<p>\u0e17\u0e33\u0e01\u0e32\u0e23 Request \u0e21\u0e32\u0e17\u0e35\u0e48 http:\/\/[Gateway_HostAddress]\/[Path]?[MapServiceURL] \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Map Service \u0e1c\u0e48\u0e32\u0e19 Proxy<\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request GET 'http:\/\/localhost:5220\/arcgis-proxy?https:\/\/gisserv2.cdg.co.th\/arcgis\/rest\/services\/AtlasX\/City\/MapServer'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">GET<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;http:\/\/localhost:5220\/arcgis-proxy?https:\/\/gisserv2.cdg.co.th\/arcgis\/rest\/services\/AtlasX\/City\/MapServer&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e17\u0e33\u0e01\u0e32\u0e23 Request \u0e21\u0e32\u0e17\u0e35\u0e48 http:\/\/[Gateway_HostAddress]\/[TokenPath]?[MapServiceURL] \u0e40\u0e1e\u0e37\u0e48\u0e2d Generate ArcGIS Token<\/p>\n\n\n\n<p>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>curl --location --request GET 'http:\/\/localhost:5220\/arcgis-token?https:\/\/gisserv2.cdg.co.th\/arcgis\/rest\/services'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">curl<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">location<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #001080\">request<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">GET<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;http:\/\/localhost:5220\/arcgis-token?https:\/\/gisserv2.cdg.co.th\/arcgis\/rest\/services&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e23\u0e48\u0e27\u0e21\u0e01\u0e31\u0e1a-frontend-\u0e14\u0e49\u0e27\u0e22-arcgis-maps-sdk-for-javascript\">\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e23\u0e48\u0e27\u0e21\u0e01\u0e31\u0e1a Frontend \u0e14\u0e49\u0e27\u0e22 ArcGIS Maps SDK for JavaScript<\/h2>\n\n\n\n<p>\u0e17\u0e35\u0e48\u0e1d\u0e31\u0e48\u0e07 Frontend \u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49 Proxy \u0e23\u0e48\u0e27\u0e21\u0e01\u0e31\u0e1a utility methods&nbsp;<strong>urlUtils<\/strong>&nbsp;\u0e2b\u0e23\u0e37\u0e2d\u0e23\u0e48\u0e27\u0e21\u0e01\u0e31\u0e1a Property esriConfig.request.proxyRules \u0e44\u0e14\u0e49 \u0e42\u0e14\u0e22\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 Proxy Rule \u0e14\u0e31\u0e07\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>const urlUtils = await $arcgis.import(\"@arcgis\/core\/core\/urlUtils.js\");\n\nurlUtils.addProxyRule({\n  urlPrefix: \"map-service-url\",\n  proxyUrl: \"http:\/\/localhost:5220\/arcgis-proxy\",\n});<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">const<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0070C1\">urlUtils<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #AF00DB\">await<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">$arcgis<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">import<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;@arcgis\/core\/core\/urlUtils.js&quot;<\/span><span style=\"color: #000000\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #001080\">urlUtils<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">addProxyRule<\/span><span style=\"color: #000000\">({<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">urlPrefix:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;map-service-url&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">proxyUrl:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;http:\/\/localhost:5220\/arcgis-proxy&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">});<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e14\u0e49\u0e27\u0e22\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e19\u0e35\u0e49\u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e17\u0e38\u0e01 Request \u0e17\u0e35\u0e48\u0e40\u0e23\u0e35\u0e22\u0e01\u0e44\u0e1b\u0e22\u0e31\u0e07 Map Service \u0e17\u0e35\u0e48\u0e02\u0e36\u0e49\u0e19\u0e15\u0e49\u0e19\u0e14\u0e49\u0e27\u0e22 map-service-url \u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 \u0e08\u0e30\u0e17\u0e33\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01\u0e1c\u0e48\u0e32\u0e19 Proxy&nbsp;<a href=\"http:\/\/localhost:5220\/arcgis-proxy?[map-service-url]\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:5220\/arcgis-proxy?[map-service-url]<\/a>&nbsp;\u0e40\u0e2a\u0e21\u0e2d<\/p>\n\n\n\n<p><\/p>\n","protected":false},"featured_media":0,"parent":525,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-528","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=528"}],"version-history":[{"count":6,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/528\/revisions"}],"predecessor-version":[{"id":3304,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/528\/revisions\/3304"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/525"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}