Skip to content

ReverseProxy read error when serving index.html from /public #57

@kylekeesling

Description

@kylekeesling

I'm having an issue when attempting to serve a file from the Rails public folder when using kamal with thruster.

I have a javascript library that requires me to copy assets to the Rails public folder so it can be accessed via the code. The path is: https://tools-demo.passtesting.com/webviewer/ui/index.html, but I get a 5xx error when attempting to access it.

When tailing the proxy logs (kamal proxy logs) I see a 301 response and then: httputil: ReverseProxy read error during body copy: unexpected EOF

When I access it as a directory (https://tools-demo.passtesting.com/webviewer/ui/) it loads as expected. The problem is that the library has a hardcoded reference to index.html instead of referring to the path, so I currently have no way to mitigate this.

The problem appears to be solved when I disable X-Sendfile (X_SENDFILE_ENABLED=false).

Ideally I'd like to keep this enabled for all of its other benefits, but is fully disabling X-Sendfile the only solution here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions