mirror of
https://github.com/labring/sealos.git
synced 2026-09-24 15:46:19 +08:00
update login redirect (#1455)
try update callback api Signed-off-by: zzjin <tczzjin@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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{})
|
||||
|
||||
Reference in New Issue
Block a user