Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using "Server" HTTP header is not a reliable mechanism for detecting S3 implementation #26

Closed
stv0g opened this issue Jun 11, 2022 · 5 comments · Fixed by #27
Closed

Comments

@stv0g
Copy link
Owner

stv0g commented Jun 11, 2022

So, I fixed the final issue with the final checksum mismatch and tested it with the included docker-compose.yml file.

Let me know if works for you :)

got yet another issue i'm afraid, since i have my domain routed through cloudflare gose now thinks i'm using cloudflare s3 and not minio

Originally posted by @LeagueRaINi in #23 (comment)

@stv0g
Copy link
Owner Author

stv0g commented Jun 11, 2022

I started to dig around a bit deeper and found here the RFC which specifies the Server header: RFC2616 (section 14.38):

The Server response-header field contains information about the software used by the origin server to handle the request.

It explicitly mentions:

If the response is being forwarded through a proxy, the proxy application MUST NOT modify the Server response-header. Instead, it SHOULD include a Via field (as described in section 14.45).

So I think Cloudflare is not complying to the RFC here.

@LeagueRaINi Can you check if your can disable this behaviour in your Cloudfare setup?

@LeagueRaINi
Copy link

LeagueRaINi commented Jun 12, 2022

not sure where i would change that in the cloudflare control panel to be honest, why not allow overwriting the s3 server impl in the config?

@stv0g
Copy link
Owner Author

stv0g commented Jun 12, 2022

Oh yeah, thats probably the simplest solution. I will implement this.

@stv0g
Copy link
Owner Author

stv0g commented Jun 12, 2022

Hi @LeagueRaINi

I've added some new settings:

GOSE_IMPLEMENTATION = MinIO

which implies the following settings which disable unsupported features by MinIO:

GOSE_SETUP_CORS = false
GOSE_SETUP_ABORT_INCOMPLETE_UPLOADS = 0

I havn`t tested the code so feedback would be appreciated :)

@LeagueRaINi
Copy link

looks like everything is working now thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants