这就是Apache所需要的.我想知道如何在h2o中这样做.
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
Run Code Online (Sandbox Code Playgroud)
//在这个btw上浪费了300点声望.
我正在LinkHTTP2响应中发送预加载标头。像这个:
Link: </assets/script/main.js?h=1795387974>; rel=preload; as=script, </assets/font/sourcesanspro_regular.woff2>; rel=preload; as=font
Run Code Online (Sandbox Code Playgroud)
脚本,样式和图像不会造成任何问题-它们已被推送和使用。但是字体被推送,然后再次请求/获取,Chromium控制台抱怨:
资源https://example.com/assets/font/sourcesanspro_regular.woff2已使用链接预加载进行了预加载,但在窗口加载事件发生后的几秒钟内未使用。请确保没有没有预装它。
这是提到的字体的响应头。
推送:
accept-ranges:bytes
cache-control:max-age=5184000, public
content-length:16892
content-type:application/octet-stream
date:Mon, 25 Sep 2017 09:22:05 GMT
last-modified:Mon, 18 Sep 2017 14:33:31 GMT
pragma:public
status:200
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-http2-push:pushed
x-xss-protection:1; mode=block
Run Code Online (Sandbox Code Playgroud)
推送后要求:
accept-ranges:bytes
cache-control:max-age=5184000, public
content-length:16892
content-type:application/octet-stream
date:Mon, 25 Sep 2017 09:22:05 GMT
last-modified:Mon, 18 Sep 2017 14:33:31 GMT
pragma:public
status:200
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-xss-protection:1; mode=block
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
The H2O R package is a great resource for building predictive models. But I am concerned with the security aspect of it.
Is it safe to use patient data with H2O in terms of security vulnerabilities ?