{"id":2520,"date":"2025-11-11T09:35:00","date_gmt":"2025-11-11T02:35:00","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=2520"},"modified":"2025-11-13T10:48:35","modified_gmt":"2025-11-13T03:48:35","slug":"json-configuration","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/ax-engine-web\/arcgis-proxy\/json-configuration\/","title":{"rendered":"JSON Configuration"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" style=\"font-style:normal;font-weight:600\">JSON Configuration<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"overview\"><strong>Overview<\/strong><\/h2>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e19\u0e35\u0e49\u0e43\u0e0a\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e04\u0e27\u0e1a\u0e04\u0e38\u0e21\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07&nbsp;<strong>ArcGIS Proxy<\/strong>&nbsp;\u0e41\u0e25\u0e30&nbsp;<strong>ArcGIS Token Generator<\/strong>&nbsp;\u0e42\u0e14\u0e22\u0e21\u0e35\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e2b\u0e25\u0e31\u0e01\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e0a\u0e48\u0e27\u0e22\u0e43\u0e2b\u0e49\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\ud83d\udd04 \u0e2a\u0e48\u0e07\u0e04\u0e33\u0e23\u0e49\u0e2d\u0e07\u0e02\u0e2d (Request) \u0e44\u0e1b\u0e22\u0e31\u0e07 ArcGIS REST Services \u0e42\u0e14\u0e22\u0e15\u0e23\u0e07\u0e08\u0e32\u0e01\u0e40\u0e1a\u0e23\u0e32\u0e27\u0e4c\u0e40\u0e0b\u0e2d\u0e23\u0e4c \u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e15\u0e34\u0e14\u0e1b\u0e31\u0e0d\u0e2b\u0e32&nbsp;<strong>CORS<\/strong><\/li>\n\n\n\n<li>\ud83d\udd10 \u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 ArcGIS Secure Services \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e21\u0e35\u0e01\u0e32\u0e23\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e15\u0e31\u0e27\u0e15\u0e19 \u0e17\u0e31\u0e49\u0e07\u0e41\u0e1a\u0e1a&nbsp;<strong>Token-based<\/strong>&nbsp;\u0e41\u0e25\u0e30&nbsp;<strong>OAuth2<\/strong><\/li>\n\n\n\n<li>\ud83d\udee1 \u0e08\u0e33\u0e01\u0e31\u0e14\u0e01\u0e32\u0e23\u0e40\u0e02\u0e49\u0e32\u0e16\u0e36\u0e07 Proxy \u0e15\u0e32\u0e21\u0e04\u0e48\u0e32&nbsp;<strong>Referer<\/strong>&nbsp;\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e42\u0e14\u0e22\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e41\u0e1a\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19-2-\u0e2a\u0e48\u0e27\u0e19\u0e2b\u0e25\u0e31\u0e01\"><strong>\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e41\u0e1a\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19 2 \u0e2a\u0e48\u0e27\u0e19\u0e2b\u0e25\u0e31\u0e01<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>Proxy<\/code><\/strong><br>\u0e01\u0e33\u0e2b\u0e19\u0e14 Endpoint \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Proxy \u0e41\u0e25\u0e30 Token API \u0e23\u0e27\u0e21\u0e16\u0e36\u0e07\u0e23\u0e32\u0e22\u0e0a\u0e37\u0e48\u0e2d referer \u0e17\u0e35\u0e48\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<\/li>\n\n\n\n<li><strong><code>ArcGIS<\/code><\/strong><br>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23 ArcGIS Services \u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e2b\u0e49 Proxy \u0e17\u0e33\u0e07\u0e32\u0e19\u0e23\u0e48\u0e27\u0e21\u0e14\u0e49\u0e27\u0e22<br>\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e30\u0e1a\u0e38\u0e44\u0e14\u0e49\u0e17\u0e31\u0e49\u0e07\u0e41\u0e1a\u0e1a Public (\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e15\u0e31\u0e27\u0e15\u0e19), Token-based (Username\/Password), \u0e41\u0e25\u0e30 OAuth2 (Client ID\/Secret)<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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\": [\n      \"&#91;REPLACE_TO_YOUR_SITE&#93;\"\n    ]\n  },\n  \"ArcGIS\": &#91;\n    {\n      \"Url\": \"https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services\"\n    },\n    {\n      \"Url\": \"https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Admin\/MapServer\",\n      \"Username\": \"admin\",\n      \"Password\": \"adminpass\"\n    },\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  &#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\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;&#91;REPLACE_TO_YOUR_SITE&#93;&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;ArcGIS&quot;<\/span><span style=\"color: #000000\">: &#91;<\/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>\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;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\">  &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-style-plain is-layout-flow wp-block-quote-is-layout-flow is-style-plain--1\" style=\"border-radius:0px\">\n<p><strong>Note<\/strong><\/p>\n\n\n\n<p class=\"no-underline has-medium-font-size\">\u2705 \u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e19\u0e35\u0e49\u0e40\u0e2b\u0e21\u0e32\u0e30\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e17\u0e31\u0e49\u0e07\u0e2a\u0e20\u0e32\u0e1e\u0e41\u0e27\u0e14\u0e25\u0e49\u0e2d\u0e21&nbsp;<strong>Development<\/strong>&nbsp;\u0e41\u0e25\u0e30&nbsp;<strong>Production<\/strong>&nbsp;\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e1b\u0e23\u0e31\u0e1a\u0e02\u0e22\u0e32\u0e22\u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e04\u0e27\u0e32\u0e21\u0e0b\u0e31\u0e1a\u0e0b\u0e49\u0e2d\u0e19\u0e02\u0e2d\u0e07\u0e23\u0e30\u0e1a\u0e1a\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e01\u0e31\u0e1a ArcGIS \u0e2b\u0e25\u0e32\u0e22\u0e41\u0e2b\u0e25\u0e48\u0e07<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"proxy-settings-proxy\"><strong>Proxy Settings (<code>Proxy<\/code>)<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Key<\/th><th>\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22<\/th><\/tr><\/thead><tbody><tr><td><code>Path<\/code><\/td><td>\u0e40\u0e2a\u0e49\u0e19\u0e17\u0e32\u0e07 API \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 ArcGIS Proxy (Default:&nbsp;<code>\/arcgis-proxy<\/code>)<\/td><\/tr><tr><td><code>TokenPath<\/code><\/td><td>\u0e40\u0e2a\u0e49\u0e19\u0e17\u0e32\u0e07 API \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e02\u0e2d ArcGIS Token (Default:&nbsp;<code>\/arcgis-token<\/code>)<\/td><\/tr><tr><td><code>AllowedReferers<\/code><\/td><td>\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e42\u0e14\u0e40\u0e21\u0e19\u0e17\u0e35\u0e48\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e01\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Proxy<br>&#8211; \u0e43\u0e0a\u0e49&nbsp;<code>\"*\"<\/code>&nbsp;\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2d\u0e19\u0e38\u0e0d\u0e32\u0e15\u0e17\u0e38\u0e01\u0e42\u0e14\u0e40\u0e21\u0e19 (\u0e44\u0e21\u0e48\u0e41\u0e19\u0e30\u0e19\u0e33\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a Production)<br>&#8211; \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07:&nbsp;<code>http:\/\/localhost<\/code>,&nbsp;<code>https:\/\/portal-atlasx.cdg.co.th<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"arcgis-services-arcgis\"><strong>ArcGIS Services (<code>ArcGIS<\/code>)<\/strong><\/h3>\n\n\n\n<p>\u0e1b\u0e23\u0e30\u0e01\u0e2d\u0e1a\u0e14\u0e49\u0e27\u0e22\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23\u0e02\u0e2d\u0e07 ArcGIS Services \u0e17\u0e35\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e01\u0e32\u0e23\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e15\u0e31\u0e27\u0e15\u0e19\u0e44\u0e14\u0e49\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a \u0e17\u0e31\u0e49\u0e07\u0e41\u0e1a\u0e1a\u0e2a\u0e32\u0e18\u0e32\u0e23\u0e13\u0e30, Token-based, \u0e41\u0e25\u0e30 OAuth2<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\ud83d\udd13-1-public-services-\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e15\u0e31\u0e27\u0e15\u0e19\"><strong>\ud83d\udd13 1. Public Services (\u0e44\u0e21\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e15\u0e31\u0e27\u0e15\u0e19)<\/strong><\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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\"Url\":\"https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services\"\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: #A31515\">&quot;Url&quot;<\/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><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\ud83d\udd10-2-token-based-\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a-arcgis-serverenterprise\"><strong>\ud83d\udd10 2. Token-based (\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a ArcGIS Server\/Enterprise)<\/strong><\/h4>\n\n\n\n<p>\u2705 \u0e43\u0e0a\u0e49 Username\/Password \u0e43\u0e19\u0e01\u0e32\u0e23\u0e02\u0e2d Token<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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  \"Url\": \"https:\/\/enterprise.example.com\/arcgis\/rest\/services\/Viewer\/MapServer\",\n  \"Username\": \"viewer\",\n  \"Password\": \"viewerpass\"\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;Url&quot;<\/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: #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: #000000\">: <\/span><span style=\"color: #A31515\">&quot;viewerpass&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\ud83d\udd11-3-oauth2-\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a-arcgis-enterpriseonline\"><strong>\ud83d\udd11 3. OAuth2 (\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a ArcGIS Enterprise\/Online)<\/strong><\/h4>\n\n\n\n<p>\u2705 ArcGIS Enterprise<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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  \"Host\": \"enterprise1.example.com\",\n  \"ClientId\": \"client-id\",\n  \"ClientSecret\": \"client-secret\",\n  \"OAuth2TokenEndpoint\": \"https:\/\/enterprise1.example.com\/portal\/sharing\/rest\/oauth2\/token\"\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;Host&quot;<\/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: #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: #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: #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><\/code><\/pre><\/div>\n\n\n\n<p>\u2705 ArcGIS Online (\u0e17\u0e31\u0e48\u0e27\u0e44\u0e1b)<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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  \"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}<\/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;Host&quot;<\/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: #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: #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: #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><\/code><\/pre><\/div>\n\n\n\n<p>\u2705 ArcGIS Online (\u0e2d\u0e07\u0e04\u0e4c\u0e01\u0e23)<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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  \"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}<\/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;Host&quot;<\/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: #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: #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: #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><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c-json\"><strong>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c JSON<\/strong><\/h2>\n\n\n\n<p>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e43\u0e2b\u0e49\u0e42\u0e04\u0e23\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e42\u0e1b\u0e23\u0e40\u0e08\u0e04\u0e40\u0e1b\u0e47\u0e19\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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>&lt;project-root>\/\n\u251c\u2500\u2500 Configurations\/\n\u2502   \u2514\u2500\u2500 ArcGISProxy\/\n\u2502       \u251c\u2500\u2500 arcgis-proxy.json (Production)\n\u2502       \u251c\u2500\u2500 arcgis-proxy.Development.json\n\u2502       \u251c\u2500\u2500 arcgis-proxy.Inhouse.json\n\u2502       \u2514\u2500\u2500 arcgis-proxy.Staging.json\n\u251c\u2500\u2500 Program.cs\n\u251c\u2500\u2500 appsettings.json\n\u2514\u2500\u2500 ...<\/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: #800000\">&lt;<\/span><span style=\"color: #267F99\">project-root<\/span><span style=\"color: #800000\">&gt;<\/span><span style=\"color: #000000\">\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u251c\u2500\u2500 Configurations\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2502   \u2514\u2500\u2500 ArcGISProxy\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2502       \u251c\u2500\u2500 arcgis-proxy.json (Production)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2502       \u251c\u2500\u2500 arcgis-proxy.Development.json<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2502       \u251c\u2500\u2500 arcgis-proxy.Inhouse.json<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2502       \u2514\u2500\u2500 arcgis-proxy.Staging.json<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u251c\u2500\u2500 Program.cs<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u251c\u2500\u2500 appsettings.json<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">\u2514\u2500\u2500 ...<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udcc4 arcgis-proxy.json<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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\": [\n      \"&#91;REPLACE_TO_YOUR_SITE&#93;\"\n    ]\n  },\n  \"ArcGIS\": &#91;\n    \/\/ Public services (No authentication required)\n    {\n      \"Url\": \"https:\/\/services3.arcgis.com\/GVgbJbqm8hXASVYi\/arcgis\/rest\/services\"\n    },\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    \/\/ 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\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\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\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #A31515\">&quot;&#91;REPLACE_TO_YOUR_SITE&#93;&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;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>\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>\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>\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>\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<p>\ud83d\udcc4 arcgis-proxy.Development.json<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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    &#93;\n  },\n  \"ArcGIS\": &#91; ... &#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: #A31515\">&quot;*&quot;<\/span><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>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #A31515\">&quot;ArcGIS&quot;<\/span><span style=\"color: #000000\">: &#91; ... &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ud83d\udcc4 arcgis-proxy.Staging.json<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,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      \"https:\/\/portal-atlasx.cdg.co.th\"\n    &#93;\n  },\n  \"ArcGIS\": &#91; ... &#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: #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; ... &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"featured_media":0,"parent":2519,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-2520","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2520","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=2520"}],"version-history":[{"count":11,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2520\/revisions"}],"predecessor-version":[{"id":3525,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2520\/revisions\/3525"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2519"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=2520"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=2520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}