admin avatar

caddy httpserver.ResponseWriterWrapper is not a closeNotifier的解決方法

🕓 by admin

在配置caddy minify時,出現了下面的錯誤

httpserver.ResponseWriterWrapper is not a closeNotifier

解決這個問題,比較簡單,因爲是代理後端程式,所以并沒有指定網站的root,

所以導致了上面的 httpserver.ResponseWriterWrapper is not a closeNotifier錯誤

解決方法,編輯Caddyfile文件添加root目錄指向,例如

root /var/www/test

但是同時也發現了一個問題,如果使用下面的caddy minify語法就會出現500錯誤

minify /

因爲是代理後端程式,所以導致了這個問題。。。

目前只能是caddy minify壓縮指定的目錄,例如

minify /static //static目錄下的所有靜態文件都會被格式化,例如css,js文件

💘 相关文章

写一条评论