mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 11:57:04 +08:00
feature (preflight): preflight to /api/files
This commit is contained in:
@ -73,6 +73,7 @@ func Init(a App) {
|
||||
files.HandleFunc("/touch", NewMiddlewareChain(FileTouch, middlewares, a)).Methods("POST")
|
||||
middlewares = []Middleware{ApiHeaders, SessionStart, LoggedInOnly}
|
||||
files.HandleFunc("/search", NewMiddlewareChain(FileSearch, middlewares, a)).Methods("GET")
|
||||
r.PathPrefix("/api/files").Handler(NewMiddlewareChain(PreflightCorsOK, []Middleware{}, a)).Methods("OPTIONS")
|
||||
|
||||
// API for Shared link
|
||||
share := r.PathPrefix("/api/share").Subrouter()
|
||||
|
||||
Reference in New Issue
Block a user