-
Notifications
You must be signed in to change notification settings - Fork 141
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
Issues serving via S3 static website #1611
Comments
This is definitely a serving configuration issue. You need to make the My quick search (linked above) says there is no default and you're somehow sending I'm happy to take documentation updates to https://bandersnatch.readthedocs.io/en/latest/storage_options.html#amazon-s3 - Source file if you feel our docs are lacking. I've sadly never setup a S3 based mirror so can not help much more here. |
I've taken a second look at things with a fresh pair of eyes. Think you pointed in the right direction with the From what I can tell the bandersnatch s3 plugin isn't specifying a Mime type when doing a aws s3api head-object --bucket <bucketname> --key web/simple/index.html
{
"AcceptRanges": "bytes",
"LastModified": "2023-11-27T12:24:18+00:00",
"ContentLength": 422,
"ETag": omitted,
"ContentType": "binary/octet-stream",
"ServerSideEncryption": "AES256",
"Metadata": {}
} From some surface level digging it looks like I sadly lack the talent and knowledge on bandersnatch to know how to go about fixing things. (If what I mention sounds right) |
Ahh, it seems if it is set @ upload / write time, then this is indeed a bandersnatch bug. Nice find. I'm asking on the issue if there are plans for a friendlier API and how do we edit existing files ContentType ... |
You can use a CDN to provide service, which could be cheaper and content-type can also be changed Use https://github.com/pottava/aws-s3-proxy and nginx to set content-type if you're using this for internal use only. |
I also encountered this bug in the s3 server... until it's fixed I had to do a recursive fix of the content-types of the index.html pages in my bucket:
|
I've run into an issue when trying to then pull packages from a bucket backed static site, but can't tell if the issue is my config a change in static sites behaviour (and how pip deals with it)
I notice that curling
/web/simple/<package>/
returns a 302 which leads me to think this is more of a static site / pip handling issue that would affect the bandersnatch implementation:My current deploymend of bandersnatch uses this template below as the base for the configuraiton:
I'm wondering if this is misconfig on my part or maybe recent change on AWS side that just breaks this design.
The text was updated successfully, but these errors were encountered: