Replies: 2 comments 4 replies
-
Hello @Intevel Ory Oathkeeper does allow for the configuration of the Content-Type header in its error handling pipeline. This includes the multipart/form-data MIME type. Here is an example of how you can specify the matching conditions for the Content-Type header:
If this configuration key is left empty, then all Content-Type headers will match. For more detailed information, I would recommend checking the documentation. By the way Ory now also offers support for companies running Ory software on-premise, read more here: https://www.ory.sh/support/ |
Beta Was this translation helpful? Give feedback.
-
How to handle multipart/form-data with Oathkeeper
Currently I am trying to send larger files with a
POST
request, the request goes through Oathkeeper.However, the connection breaks after about 5 seconds.
I'm trying to figure out how Oathkeeper deals with this or how it will be dealt with in the future.
Unlike with Websockets, Oathkeeper stops the requests after about 5 seconds ignoring
Connection: keep-alive
SSE Writes
This problem is related to #877, the connection
keep-alive
header is simply ignored. Oathkeeper should respect theConnection: keep-alive
even if the HTTP read timeout is set.Read Timeout
Obviously, if you set the read timeout higher, the request will work. However, this is not a real fix. In general it should be clear that you don't know how long a file upload takes
Is there a way to configure this as rule, and not for every route?
Long story, short.
In general, this seems to be a problem, even with other proxy software. However, file uploads are important, and increasing the timeout is not a proper solution.
How will Oathkeeper handle this in the future, or is there currently already a way to handle it better? Maybe I'm missing something. As said in #877 (comment) and #877 (comment) the
Connection: keep-alive
header should be implemented orContent-Type
streams should ignore the timeout settings.Beta Was this translation helpful? Give feedback.
All reactions