02-28-2019 07:31 AM
Hi,
I am using Angular Version 6 & Alfresco community version 5.2
"@alfresco/adf-content-services": "2.6.1",
"@alfresco/adf-core": "2.6.1",
On API call if I am logged out and calling the webscript/api from angular I got the basic auth popup every time.
I need to disable it.
Is there any way to do the same?
I have asked the same question on stackoverflow platform
angular6 - Disable Alfresco rest api basic auth popup - Stack Overflow
03-07-2019 09:37 AM
Hi this problem has been solved in the last version of the content service 6.0.0. If you want a workaround for your project witout update the CS you nee to use something similar on what we do in onProxyRes:
module.exports = {
"/alfresco": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/alfresco/alfresco": ""
},
"changeOrigin": true,
// workaround for REPO-2260
onProxyRes: function (proxyRes, req, res) {
const header = proxyRes.headers['www-authenticate'];
if (header && header.startsWith('Basic')) {
proxyRes.headers['www-authenticate'] = 'x' + header;
}
}
},
"/activiti-app": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/activiti-app/activiti-app": ""
},
"changeOrigin": true
}
};
03-07-2019 09:37 AM
Hi this problem has been solved in the last version of the content service 6.0.0. If you want a workaround for your project witout update the CS you nee to use something similar on what we do in onProxyRes:
module.exports = {
"/alfresco": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/alfresco/alfresco": ""
},
"changeOrigin": true,
// workaround for REPO-2260
onProxyRes: function (proxyRes, req, res) {
const header = proxyRes.headers['www-authenticate'];
if (header && header.startsWith('Basic')) {
proxyRes.headers['www-authenticate'] = 'x' + header;
}
}
},
"/activiti-app": {
"target": "http://localhost:8080",
"secure": false,
"pathRewrite": {
"^/activiti-app/activiti-app": ""
},
"changeOrigin": true
}
};
12-13-2019 09:40 AM
Hello,
I have the same issue when using ADF extension. On the main application it works fine and issue is solved but after the creation of an extension (https://alfresco-content-app.netlify.com/#/extending/extensibility-features) I have the problem back again
Note that I amusing ACS 6.1
As for the workarround you mentionned I can't apply to an extension because I don't have proxy.conf.js in the structure but only a proxy.conf.json.
proxy.conf.js has the fix you mentionned
Any idea?
Thank you
Jamil
03-13-2019 11:11 AM
Thank you very much, Eugenio Romano for your reply,
Let me check & implement this.
Explore our Alfresco products with the links below. Use labels to filter content by product module.