mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 14:30:26 +00:00
Rename to One API
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"gin-template/common"
|
||||
"gin-template/model"
|
||||
"github.com/gin-contrib/sessions"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"one-api/common"
|
||||
"one-api/model"
|
||||
)
|
||||
|
||||
func authHelper(c *gin.Context, minRole int) {
|
||||
|
@@ -7,6 +7,6 @@ import (
|
||||
|
||||
func CORS() gin.HandlerFunc {
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowOrigins = []string{"https://gin-template.vercel.app", "http://localhost:3000/"}
|
||||
config.AllowOrigins = []string{"https://one-api.vercel.app", "http://localhost:3000/"}
|
||||
return cors.New(config)
|
||||
}
|
||||
|
@@ -3,9 +3,9 @@ package middleware
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"gin-template/common"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"one-api/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@@ -2,11 +2,11 @@ package middleware
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"gin-template/common"
|
||||
"github.com/gin-contrib/sessions"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"one-api/common"
|
||||
)
|
||||
|
||||
type turnstileCheckResponse struct {
|
||||
|
Reference in New Issue
Block a user