[CLOSED] Enable embedding Fintoso App - CORS Issue
Hi,
I am working through the embedding of Fintoso app as per docs. Currently I am getting below two errors - 1) Refused to apply style from 'http://localhost:3000/ibi_apps/logon/resources/S88_15556327241F/wfelogon.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. 2) Refused to display 'http://localhost:3000/ibi_apps/logon/resources/markup/blank.html' in a frame because it set 'X-Frame-Options' to 'deny'.
Pls help. We do not see the configuration for 'X-Frame-Options in the Admin Console anymore. I believe it does not exist anymore.This message has been edited. Last edited by: FP Mod Chuck,
August 12, 2019, 04:06 PM
sval
Pls correct the typo in the heading - *Enable embedding Fintoso App - CORS Issue
August 12, 2019, 04:15 PM
Waz
You can edit the title by editing your first post.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
August 13, 2019, 08:28 AM
sval
Thanks, I updated it. Any suggestions on the errors I am seeing
August 13, 2019, 10:19 AM
Satheesh Babu
You can enable the CORS setting in the Admin console.
Cross site Scripting Protection --> Choose False from the Drop down. Also Uncheck Cross site scripting Protection block.
Save the changes.
CORS should be enabled on both Web focus And the Application where you want to embed the portal.
WebFOCUS 8.2.04 AIX/UNIX/Windows, All Outputs
August 13, 2019, 10:41 AM
sval
Initially we were getting CORS errors and updated the setting to enable it. Now CORS error is gone, and we do see the response HTML, however, the page renders with below errors. - Refused to apply style from 'http://localhost:3000/ibi_apps/logon/resources/S88_15556327241F/wfelogon.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. about:blank:1 Refused to display 'http://localhost:3000/ibi_apps/logon/resources/markup/blank.html' in a frame because it set 'X-Frame-Options' to 'deny'. about:blank:1 Refused to apply style from 'http://localhost:3000/ibi_apps/logon/resources/S88_15556327241F/menuJQ.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
And get below errors, when we put in user ffadv and click sign in VM2124 about:blank:1 Uncaught ReferenceError: onLogonKeyPress is not defined at HTMLInputElement.onkeypress (VM2124 about:blank:1) onkeypress @ VM2124 about:blank:1 about:blank:1 Uncaught ReferenceError: Signin is not defined at HTMLInputElement.onclick (VM2124 about:blank:1)
August 13, 2019, 11:34 AM
Satheesh Babu
It looks like the web application is expecting same origin. Where do you embed the WebFOCUS portal? Is it .net or java application?
WebFOCUS 8.2.04 AIX/UNIX/Windows, All Outputs
August 13, 2019, 11:41 AM
sval
This is a javascript application.
August 13, 2019, 12:39 PM
Satheesh Babu
Create a html page in your local machine. and use your portal URL in iframe src.
The error I see is - Refused to display 'https://hostname/ibi_apps/signin' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
I tried adding header in html like below and still see the same error - < !DOCTYPE html> < html> < head> < meta http-equiv="Access-Control-Allow-Origin" content="*"/> < /head>