![](/img/trans.png)
[英]Can I render a DotNetNuke module's control without restricting the page to a specific module?
[英]Can I force SSL to secure a Dotnetnuke Module Edit Page?
我有一個DNN模塊,不在乎VIEW頁面是否不使用SSL 。
但是,當模塊編輯器在管理模板中加載我模塊的EDIT頁面時(我的模塊是頁面上的唯一模塊),如果站點具有SSL功能,我想使用SSL安全地加載頁面。
這可能嗎?
是的,只需將以下內容放在模塊代碼的開頭即可。
// Force Page to use SSL if it can.
if (PortalSettings.SSLEnabled && !Request.IsSecureConnection)
{
DotNetNuke.Security.PortalSecurity.ForceSecureConnection();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.