Fix: cors middleware should be applied directly to root router

This commit is contained in:
HFO4
2019-12-29 13:15:09 +08:00
parent ac2de841d2
commit b5ee3ee609
4 changed files with 8 additions and 10 deletions

View File

@@ -111,6 +111,7 @@ func (service *SingleFileService) CreateDocPreviewSession(ctx context.Context, c
}
// 生成最终的预览器地址
// TODO 从配置文件中读取
viewerBase, _ := url.Parse("https://view.officeapps.live.com/op/view.aspx")
params := viewerBase.Query()
params.Set("src", downloadURL)