我可以强制SSL来保护Dotnetnuke模块编辑页面吗?(Can I force SSL to secure a Dotnetnuke Module Edit Page?)
我有一个DNN模块,如果VIEW页面不使用SSL ,我不在乎。
但是,当模块编辑器在管理模板中加载模块的EDIT页面 (我的模块是页面上唯一的模块)时,如果站点具有SSL功能,我想使用SSL安全地加载页面。
这可能吗?
I have a DNN modules where I don't care if the VIEW page does not use SSL.
However, when a module editor loads my modules' EDIT page in the admin template (my module is the only module on the page) I want to load the page securely using SSL, if the site has SSL capability.
Is this possible?
最满意答案
是的,只需将以下内容放在模块代码的开头即可。
// Force Page to use SSL if it can. if (PortalSettings.SSLEnabled && !Request.IsSecureConnection) { DotNetNuke.Security.PortalSecurity.ForceSecureConnection(); }Yes, just put the following at the start of the modules's code behind.
// Force Page to use SSL if it can. if (PortalSettings.SSLEnabled && !Request.IsSecureConnection) { DotNetNuke.Security.PortalSecurity.ForceSecureConnection(); }更多推荐
发布评论