Skip to content

Commit

Permalink
Defaulting to respect forwarded headers (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
whytheplatypus authored May 2, 2024
1 parent 487ab08 commit c36f4d5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions upload-server/internal/handlertusd/handlertusd.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ func New(store Store, locker Locker, hooksHandler hooks.HookHandler, basePath st
// Create a new HTTP handler for the tusd server by providing a configuration.
// The StoreComposer property must be set to allow the handler to function.
handler, err := hooks.NewHandlerWithHooks(&tusd.Config{
BasePath: basePath,
StoreComposer: composer,
NotifyCompleteUploads: true,
// NotifyTerminatedUploads: true,
// NotifyUploadProgress: true,
// NotifyCreatedUploads: true,
// PreUploadCreateCallback:

Logger: logger,
BasePath: basePath,
StoreComposer: composer,
NotifyCompleteUploads: true,
Logger: logger,
RespectForwardedHeaders: true,
DisableDownload: true,
}, hooksHandler, []hooks.HookType{hooks.HookPreCreate, hooks.HookPostCreate, hooks.HookPostReceive, hooks.HookPreFinish, hooks.HookPostFinish, hooks.HookPostTerminate}) // .handler
if err != nil {
logger.Error("error start tusd handler", "error", err)
Expand Down

0 comments on commit c36f4d5

Please sign in to comment.