发布于 4 天前
发布于 4 天前
白痴
更新于 4 天前
0
0
默认的应用配置支持webdav, 但不支持MOVE等操作
需要特殊头, 特别是 Destination 头
在自定义nginx配置里面添加下面内容就好了
但是还是希望官网原生支持下, 感谢长亭~~
# 使用正则捕获 Destination 中的路径部分
set $dest_path "";
if ($http_destination ~ "^https?://[^/]+(.*)$") {
set $dest_path $1;
}
# 如果没有匹配到,使用原始值
if ($dest_path = "") {
set $dest_path $http_destination;
}
# 改写 Destination 为后端内部地址, 修改xxx
proxy_set_header Destination "http://xxx.xxx.xxx.xxx:xx$dest_path";
proxy_set_header Overwrite $http_overwrite;
proxy_set_header Depth $http_depth;
proxy_set_header If $http_if;
proxy_set_header Lock-Token $http_lock_token;
白痴
更新于 4 天前
0
0
不过这样的话, windows管理器下面使用webdav时, 可能还会有中文问题
但是雷池的nginx没有 set_unescape_uri , 无法解码
只能webdav服务端作相应调整