forked from AltisCorp/election-polling-places
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.config
87 lines (82 loc) · 5.52 KB
/
proxy.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<!--
| Version 10.2
| Copyright 2013 Esri
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
-->
<ProxyConfig>
<!-- Provide the URL of your application's site (or even just the URL of the server) so that only it
may use the proxy. If this section is omitted, any application on any site in the world may use
the proxy. -->
<applicationSiteUrl>yourSiteUrl</applicationSiteUrl>
<!-- With URL rewriting, the proxy adapts the URL sent by the calling app by modifying it and/or adding
authentication information. If this section is omitted, no URLs will be checked for rewriting. -->
<UrlRewriting>
<UrlToRewrite urlPrefix="https://www.arcgis.com/sharing/">
<!-- Rule for accessing ArcGIS Online accounts via username and password; omit for apps accessing
ArcGIS Online via OAuth2 authentication and for apps not using ArcGIS Online accounts. -->
<agolCredentials>
<!-- Provide your arcgis.com credentials; if you provide multiple names, the
program chooses one randomly to load-share the access to reduce logging
out previous logins. For each name, provide a corresponding password;
separate passwords with commas. -->
<authenticationUrl>https://www.arcgis.com/sharing/generateToken</authenticationUrl>
<usernames>oneOrMoreUsernamesSeparatedByCommas</usernames>
<passwords>oneOrMorePasswordsSeparatedByCommas</passwords>
<tokenCacheDurationMinutes>60</tokenCacheDurationMinutes>
</agolCredentials>
</UrlToRewrite>
<UrlToRewrite urlPrefix="http://route.arcgis.com/arcgis/rest">
<!-- Rule for accessing ArcGIS Online accounts via OAuth2; omit for apps accessing ArcGIS Online
via username and password authentication and for apps not using ArcGIS Online accounts. -->
<agolOAuth2Credentials>
<!-- This rule provides OAuth 2 authentication for an arcgis.com app. This authentication is
a two-step process: the rule asks arcgis.com for a token using credentials defined below,
then the proxy is able to use this token to access AGOL content. The proxy caches the
token for the period specified below.
To generate application-level authentication credentials, go to arcgis.com and create
a new application item ("The item is: An application" + ● Web Mapping) and provide your
site's URL. On the new item's arcgis.com page under the App Registration section, click
on REGISTER and use the Add button to add your site's URL into the "Redirect URI" list;
leave the app type as "Browser". Click REGISTER. The App Registration section will be
updated with the item's App ID; click on Show Secret to see the App Secret; copy both
to the credentials (below). -->
<authenticationUrl>https://www.arcgis.com/sharing/oauth2/token</authenticationUrl>
<appId>App ID</appId>
<appSecret>App Secret</appSecret>
<tokenCacheDurationMinutes>60</tokenCacheDurationMinutes>
</agolOAuth2Credentials>
</UrlToRewrite>
</UrlRewriting>
<!-- Provide as much of the URL prefix as possible for servers that you'll permit, including rewritten URLs
such as "https://www.arcgis.com/sharing/". If this section is omitted, no sites outside of your server
may be queried for data. -->
<!-- The "exemptRSS2" switch ("false" if omitted) indicates if RSS feeds are exempt from the accepted servers
restriction. If "true" and the URL prefix is not in the list of server URLs below, then the proxy
retrieves the URL content but will not forward it to the app unless the content parses as RSS 2. If the
URL prefix is in the list, then the proxy does not check its returned content for RSS 2. -->
<serverUrls>
<!-- url: permitted external site; use either specific URL or stem -->
<serverUrl url="http://tryitlive.arcgis.com/arcgis/rest/services/"></serverUrl>
<serverUrl url="http://services.arcgis.com/b6gLrKHqgkQb393u/arcgis/rest/services/"></serverUrl>
<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest/services/"></serverUrl>
<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest"></serverUrl>
<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest"></serverUrl>
<serverUrl url="http://server.arcgisonline.com/ArcGIS/rest"></serverUrl>
<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest"></serverUrl>
<serverUrl url="http://serverapi.arcgisonline.com/jsapi"></serverUrl>
<serverUrl url="http://geocode.arcgis.com/arcgis/rest/services/"></serverUrl>
<serverUrl url="http://route.arcgis.com/arcgis/rest/services/"></serverUrl>
</serverUrls>
</ProxyConfig>