如何在我的 HTML 网站上嵌入 Apex 网站

How to Embed an Apex website on my HTML Website

我有一个用于网站 CMS 的 Apex 应用程序,我想在用户登录时将其嵌入我的网站。

我试过使用 iframe,但 APEX 应用程序未显示在 iframe 中。

在 HTML 网站中嵌入 APEX 应用程序的正确方法是什么?

在 APEX 应用程序管理器中有一个允许浏览器嵌入的设置,必须启用此设置才能嵌入到 iframe 中。我在尝试时忽略了这个设置。

作为 APEX 的新用户,不清楚在哪里可以找到 OP 提到的设置。对于 APEX 5,我发现启用 iframe 的设置如下:

  1. 在浏览器中打开 APEX(例如,我的 URL 是 http://some-host:1337/ords
  2. 以管理员身份登录您的工作区
  3. 单击应用程序生成器
  4. 单击要启用的应用程序的名称以将其打开
  5. 在显示您的应用程序名称的标题栏上,单击编辑应用程序属性(右侧按钮)
  6. 在顶部,找到 安全 的 link 并单击它
  7. 向下滚动到 浏览器安全性 部分或单击标有浏览器安全性
  8. 的选项卡
  9. 假设它说 Deny,将其更改为 AllowAllow from same origin
  10. 应用更改

完成后,您应该能够在 iframe 的 src="[apex_url]" 属性中为特定的 APEX 应用程序嵌入 URL。

Note: Choosing Allow vs Allow from same origin depends on whether or not your application is running on the same host / root URL. In my case, the iframe was served from a different URL thus I chose Allow. Out of scope for this question but, for security reasons, you probably need to consider the implications of allowing this in your own environment.