update login redirect (#1455)

try update callback api

Signed-off-by: zzjin <tczzjin@gmail.com>
This commit is contained in:
zzjin
2022-08-03 22:43:52 +08:00
committed by GitHub
parent 9c82480ac1
commit 2f3f95bcf6
27 changed files with 259 additions and 148 deletions
+3 -3
View File
@@ -14,13 +14,13 @@
package httpserver
import "github.com/emicklei/go-restful"
import restful "github.com/emicklei/go-restful/v3"
//Cors is cors for restful utils
// Cors is cors for restful utils
func Cors(wsContainer *restful.Container) {
// Add container filter to enable CORS
cors := restful.CrossOriginResourceSharing{
ExposeHeaders: []string{"X-My-Header"},
// ExposeHeaders: []string{"X-My-Header"},
AllowedHeaders: []string{"Content-Type", "Accept"},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"},
CookiesAllowed: true,
+2 -2
View File
@@ -17,11 +17,11 @@ package httpserver
import (
"net/http"
"github.com/emicklei/go-restful"
restful "github.com/emicklei/go-restful/v3"
"github.com/labring/sealos/pkg/utils/logger"
)
// GoRestful is a http server using go-restful
// GoRestful is a http server using go-restful/v3
func GoRestful(registerFunc func(*restful.WebService), addr string) error {
container := restful.NewContainer()
container.Router(restful.CurlyRouter{})