I'm working on a use-case that involves retrieving files from an external source (out of my control) which serves them with a Content-Disposition header set to attachment. I would like to serve these files to my client with Content-Disposition: inline instead.
Is there a simple/straightforward way to go about creating a proxy that will forward the request and alter this one header? My immediate thought was to create a lambda function that retrieves the file, and serves it to the end-user with an altered header, but that feels convoluted and like there's a better approach.
Something hosted on AWS is preferred, as this is where we are hosting everything else.
I've looked into several options. One option I've put together is a simple Lambda function that retrieves the file and then forwards it on to the user with whatever headers I want, but I am curious if there are better approaches (or if this is the best approach, how you would go about writing about such a function).