Next step was to add that application to a portal service (also on that same subaccout). I managed to do this pretty easily, but when I launched that app from its tile - nothing happend. Or more accurately - application launched but there was only message that webpage refused connection.
You can find more on that option here but in short - is is security directive in http header, which prevents ClickJacking attack. This is done in a way, that page prevents to be included itself in iFrame of other page.
But in case of portal - this is exactly what we want to do. Portal page opens our application in iFrame. And because application dont want to be included - we see that error.
In order to resolve this we have 2 options>
After that you have to restart the app router application so the new variable will take effect. You can do that on Overview page in the left menu.
- In portal, you can set, that application will open in new tab instead of inside of portal page
convince app router application to not include that security option into http header. This can be done in SCP cockpit. You need to go to your subaccount and space where you have your application deployed. On the left side in menu Applications find you app router. Click on its name and this will get you to its configuration. There you have User-Provided Variables. There you have to add new variable named
SEND_XFRAMEOPTIONS = false
Then go to the portal, reload page and you should see the application up and running. Sometimes it is necessary also reload whole portal site.
Addition:
You can also set that environment variable automatically during the deployment proces.
Just add it as a property to the app routers part of mta.yaml.
modules:
- name: my-approuter
type: approuter.nodejs
path: my-approuter
properties:
SEND_XFRAMEOPTIONS: false <-------- this property
parameters:
disk-quota: 256M
memory: 256M
requires:
- name: my_html_repo_runtime
- name: uaa
- name: destination
- name: connectivity
Hi, Thanks for this. I developed MTA application but if i run the application from second time onwards, $metadata is not loaded and the application hangs. Do you have any solution fr this. Thanks
ReplyDeleteThe payment settlement process is the process between the defaulter and the merchant. Once the settlement has been done, the defaulter ratings will not decrease further. CreditQ offers the list of business credit defaulters for people, added by the member merchants. As settlement depends on both parties, we can help you to maintain and track the settlement process.
ReplyDelete