I m triying to add a secured feature service to CMV using a proxy page.
My viewer.js file is the following:
esriConfig.defaults.io.proxyUrl = 'myProxyURL';
esriConfig.defaults.io.alwaysUseProxy = false;
operationalLayers: [
{
type: 'feature',
url: 'myURL',
title: i18n.feature1,
options: {
id: 'feature_layer_1',
opacity: 1.0,
visible: true,
outFields: ['*'],
mode: 0
}
},
And my proxy.config file:
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
logFile="proxy_log.log"
mustMatch="false">
<serverUrls>
<serverUrl
url="myURL"
username="myusername"
password="mypassword"
rateLimit="120"
rateLimitPeriod="60"
matchAll="true"/>
</serverUrls>
</ProxyConfig>
But when the CMV is starting, it prompts me to put username and password... What am I doing wrong?