6

How to enable clickjacking protection in fiori app inside component.js file

 2 years ago
source link: https://answers.sap.com/questions/13668934/how-to-enable-clickjacking-protection-in-fiori-app.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
8 minutes ago

How to enable clickjacking protection in fiori app inside component.js file

2 Views

I'm working on enable clickjacking protection by implementing a script in component.js file ,locally I added the property data-sap-ui-frameOption='deny' in all script in index.html file

what's I'm going to do now to enable it in deployment app is that :

sap.ui.define(['sap/fe/core/AppComponent'], function(AppComponent) {
'use strict';
return AppComponent.extend('evsapfiori.organization.Component', {
metadata: {
manifest: 'json'
},
init: function() {
const scripts = document.scripts;
for (let index = 0; index < scripts.length; index++) {
scripts[index].setAttribute('data-sap-ui-frameOptions','deny');
}
}
});
});

I got this error : init() not called for UIComponent: 'evsapfiori.organization'. This is likely caused by a missing super call in the component's init implementation.



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK