proxy

This commit is contained in:
微凉
2021-10-29 00:02:02 +08:00
parent 0a50fbd080
commit f4969560d4
6 changed files with 49 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import (
"github.com/Xhofe/alist/model"
"github.com/Xhofe/alist/utils"
"github.com/go-resty/resty/v2"
"github.com/gofiber/fiber/v2"
"github.com/robfig/cron/v3"
log "github.com/sirupsen/logrus"
"path/filepath"
@ -25,6 +26,11 @@ func init() {
type AliDrive struct {
}
func (a AliDrive) Proxy(ctx *fiber.Ctx) {
ctx.Request().Header.Del("Origin")
ctx.Request().Header.Set("Referer", "https://www.aliyundrive.com/")
}
type AliRespError struct {
Code string `json:"code"`
Message string `json:"message"`