mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Remove ssl_actions and add rewrite_level to inline JS
This commit is contained in:
parent
e1fabe4242
commit
64baf4e8e3
3 changed files with 3 additions and 14 deletions
|
|
@ -532,10 +532,6 @@ jQuery(function($) {
|
||||||
filename = '';
|
filename = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(protocol !== 'https' && queries.act && $.inArray(queries.act, window.ssl_actions) !== -1) {
|
|
||||||
protocol = 'https';
|
|
||||||
}
|
|
||||||
|
|
||||||
return uri.protocol(protocol).port(port || null).normalizePort().filename(filename);
|
return uri.protocol(protocol).port(port || null).normalizePort().filename(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1103,6 +1099,8 @@ var Base64 = {
|
||||||
* 하위호환용으로 남겨 놓음
|
* 하위호환용으로 남겨 놓음
|
||||||
* ------------------------------------------- */
|
* ------------------------------------------- */
|
||||||
|
|
||||||
|
window.ssl_actions = [];
|
||||||
|
|
||||||
if(typeof(resizeImageContents) == 'undefined') {
|
if(typeof(resizeImageContents) == 'undefined') {
|
||||||
window.resizeImageContents = function() {};
|
window.resizeImageContents = function() {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,16 +42,6 @@
|
||||||
|
|
||||||
// Decide whether or not to use SSL.
|
// Decide whether or not to use SSL.
|
||||||
var url = request_uri;
|
var url = request_uri;
|
||||||
if ($.isArray(ssl_actions) && params.act && $.inArray(params.act, ssl_actions) >= 0) {
|
|
||||||
url = default_url || request_uri;
|
|
||||||
var port = window.https_port || 443;
|
|
||||||
var _ul = $("<a>").attr("href", url)[0];
|
|
||||||
var target = "https://" + _ul.hostname.replace(/:\d+$/, "");
|
|
||||||
if (port != 443) target += ":" + port;
|
|
||||||
if (_ul.pathname[0] != "/") target += "/";
|
|
||||||
target += _ul.pathname;
|
|
||||||
url = target.replace(/\/$/, "") + "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check whether this is a cross-domain request. If so, use an alternative method.
|
// Check whether this is a cross-domain request. If so, use an alternative method.
|
||||||
if (!isSameOrigin(location.href, url)) return send_by_form(url, params);
|
if (!isSameOrigin(location.href, url)) return send_by_form(url, params);
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
var https_port = {Context::get("_https_port") ?: 'null'};
|
var https_port = {Context::get("_https_port") ?: 'null'};
|
||||||
var enforce_ssl = {$site_module_info->security === 'always' ? 'true' : 'false'};
|
var enforce_ssl = {$site_module_info->security === 'always' ? 'true' : 'false'};
|
||||||
var cookies_ssl = {config('session.use_ssl_cookies') ? 'true' : 'false'};
|
var cookies_ssl = {config('session.use_ssl_cookies') ? 'true' : 'false'};
|
||||||
|
var rewrite_level = {intval(\Rhymix\Framework\Router::getRewriteLevel())};
|
||||||
var ssl_actions = [];
|
var ssl_actions = [];
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue