最近看到elmah收到奇怪的錯誤訊息
A potentially dangerous Request.Path value was detected from the client (?)
看網址,路由也正常,path?querystringname=querystringvalue
這樣的格式
後來查了一下
原來要注意的是HTTP_X_WAWS_UNENCODED_URL
這個欄位
可以發現他丟過來的是邊碼過的問號符號%3F
所以實際上並不符合查詢參數格式,就判斷為危險字元了
丟這個的還是AdsBot-Google (+http://www.google.com/adsbot.html)
WTF...
2019年11月22日 星期五
A potentially dangerous Request.Path value was detected from the client (?)
標籤:
elmah,
googlebot,
http,
query string,
web
2019年11月8日 星期五
iOS html5 video autoplay
有個需求是要自動播一個mp4影片在活動網頁頂部
在mobile上也要自動播
影片本身沒有音效需求,只是影像
將video tag設定了autoplay
自動播放、 muted
靜音,
在android的chrome上是會自動播放,但是在ios的safari & chrome上無效,
根據這篇文章應該是靜音就可以了,
嘗試拿免費軟體shotcut將影片檔重新匯出無音軌的,也沒有用
後來看apple的官網文章
https://developer.apple.com/documentation/webkit/safaritoolsandfeatures/deliveringvideocontentfor_safari#3030250
還要再加上一個 playsinline
屬性才行
加上了之後的確可以了,不需要無音軌影片,靜音即可
訂閱:
文章 (Atom)