mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 13:08:26 -05:00
use go-chi middlewares
go-chi already delivers the middlewares we need so we don't need to import other libraries for that.
This commit is contained in:
@@ -2,6 +2,7 @@ package http
|
||||
|
||||
import (
|
||||
"github.com/asim/go-micro/v3"
|
||||
chimiddleware "github.com/go-chi/chi/middleware"
|
||||
svc "github.com/owncloud/ocis/graph-explorer/pkg/service/v0"
|
||||
"github.com/owncloud/ocis/graph-explorer/pkg/version"
|
||||
"github.com/owncloud/ocis/ocis-pkg/middleware"
|
||||
@@ -26,8 +27,8 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
svc.Logger(options.Logger),
|
||||
svc.Config(options.Config),
|
||||
svc.Middleware(
|
||||
middleware.RealIP,
|
||||
middleware.RequestID,
|
||||
chimiddleware.RealIP,
|
||||
chimiddleware.RequestID,
|
||||
middleware.NoCache,
|
||||
middleware.Cors,
|
||||
middleware.Secure,
|
||||
|
||||
Reference in New Issue
Block a user