Skip to content

Commit

Permalink
Cleaner subpath prefix at server end
Browse files Browse the repository at this point in the history
  • Loading branch information
GlowingScrewdriver committed Dec 18, 2024
1 parent abaa9f9 commit f1a8569
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store
echoServer.Use(middleware.Recover())
s.echoServer = echoServer

// Handle reverse proxy
echoServer.Pre(middleware.Rewrite(map[string]string{
"/memos/*": "/$1",
}))

workspaceBasicSetting, err := s.getOrUpsertWorkspaceBasicSetting(ctx)
if err != nil {
return nil, errors.Wrap(err, "failed to get workspace basic setting")
Expand Down

0 comments on commit f1a8569

Please sign in to comment.