Closed arrowcircle closed 1 year ago
Yes, you can wrap the app with your middleware:
class MyMiddleware
def initialize(app)
@app = app
end
def call(env)
# do authentication checks here
@app.call(env)
end
end
uppy_s3 = Uppy::S3Multipart::App.new(...)
uppy_s3 = MyMiddleware.new(uppy_s3)
# in your routes:
mount uppy_s3 => "/s3/multipart"
I'll close this issue since it's a usage question, and those should be asked in discussions 😉
Hey! I was using simple rails route constrain to check for authorization, but struggle to customize 404 error with more reliable unauthorized status code. What is the best way to customize these checks? Is there are any ways to inject middleware with checks?