小编vic*_*ico的帖子

在HTTPS中加载Google字体,内容被阻止

有一个wordpress主题,自动拉取选择字体选择并从谷歌字体请求它.当几个选定页面需要ssl时,字体就变成了missing

查看控制台日志:

[已屏蔽]" https://www.example.com/ "上的页面是通过HTTPS加载的,但是运行了来自" http://fonts.googleapis.com/css?family=Alegreya+Sans:300,400,500,700,800 "的不安全内容:此内容也应通过HTTPS加载.

会进入代码并使用谷歌字体的所有https请求工作吗?这有什么解决方法吗?

找到了源代码......但好像它已经在做了这个......在if逻辑中会出现错误吗?

$prefix = "http";
            if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') $prefix = "https";

            if($get_google_font){

            if(!in_array($rule_split[0], $this->used_fonts))
            {
                $this->extra_output .= "\n<!-- google webfont font replacement -->\n";
                $this->extra_output .= '<link id="google_webfont_'.$this->webfont_count.'" rel="stylesheet" type="text/css" href="'.$prefix.'s://fonts.googleapis.com/css?family='.str_replace(' ','+',$rule_split[0]).$font_weight.'" />';
            }
Run Code Online (Sandbox Code Playgroud)

css wordpress https fonts mixed-content

28
推荐指数
3
解决办法
6万
查看次数

WooCommerce 密码强度更改为 6 个字符

与其他人一样,密码强度对于客户来说有点难以处理。所以我使用了以下内容,删除了所有密码检查(“1”现在是有效密码)

function remove_wc_password_meter() {
wp_dequeue_script( 'wc-password-strength-meter' );
}
add_action( 'wp_print_scripts', 'remove_wc_password_meter', 100 );
Run Code Online (Sandbox Code Playgroud)

它是基于脚本的,有没有办法不接触脚本使其只需要至少 6 个字符?

php passwords wordpress woocommerce

5
推荐指数
1
解决办法
8823
查看次数

IIS7 Wordpress大型上传HTTP错误

我有一个运行PHP 7.1Windows 2012 R2 Server,在IIS7上托管了一个Wordpress

wordpress媒体库的默认上载大小为2MB,我可以将其更改php.ini512MB。但是,当上传大文件时,尤其是超过70 MB的文件,上传开始,然后暂停并挂在中间。服务器超时后,我收到wordpress HTTP错误。 net::ERR_CONNECTION_RESET在检查控制台上。

此超时发生在上传开始后的10到20秒之间,并且在不同的生产环境中会立即发生。

WordPress的错误 控制台错误

我已经做了很多搜索,并在Windows安装程序上使用新的wordpress创建了一个新环境,但是在Windows 2007 SP2安装程序上遇到了同样的问题。

Inside wp-config.php

@ini_set( 'upload_max_size' , '512M' );
@ini_set( 'post_max_size', '512M' );
@ini_set( 'memory_limit', '1024M' );
@ini_set( 'max_execution_time', '300' );
Run Code Online (Sandbox Code Playgroud)

inside web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <httpRuntime executionTimeout="3600" maxRequestLength="1048576" requestLengthDiskThreshold="1048576"/>
    <identity impersonate="true"/>
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="1073741824"></requestLimits>
      </requestFiltering>
    </security>
    <rewrite>
      <rules/>
    </rewrite>
  </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

inside php.ini

upload_max_filesize = 512M
post_max_size = 512M
memory_limit …
Run Code Online (Sandbox Code Playgroud)

php windows iis wordpress file-upload

5
推荐指数
1
解决办法
580
查看次数

防止 iframe 重新加载父级

我有一个带有标准 iframe 标记的页面

框架内链接到 Https URL iframe 进行一些处理(付款信息等)

然后returns back a POST data当处理失败大部分时间不重新加载父页面(Return url, plus POST data to that URL, loads inside Iframe),当处理支付返回成功时,大部分时间它完全重新加载父页面(Returns url, plus POST data to the Successful URL, Reloads parent to that URL

由于这是来自安全支付的代码,因此我无法展示很多东西。

是否有任何 javascript 或 Html attr 可以使这个没有 randomness

html javascript iframe

2
推荐指数
1
解决办法
5335
查看次数