mirror of
https://github.com/usememos/memos.git
synced 2024-12-28 16:14:03 +08:00
chore: use cors
middleware
This commit is contained in:
parent
47ffd99c3b
commit
99df4acfe9
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,8 @@ func NewServer(profile *profile.Profile) *Server {
|
||||||
Format: "${method} ${uri} ${status}\n",
|
Format: "${method} ${uri} ${status}\n",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
e.Use(middleware.CORS())
|
||||||
|
|
||||||
e.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{
|
e.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{
|
||||||
Skipper: middleware.DefaultSkipper,
|
Skipper: middleware.DefaultSkipper,
|
||||||
ErrorMessage: "Request timeout",
|
ErrorMessage: "Request timeout",
|
||||||
|
|
Loading…
Reference in a new issue