scireum / s3ninja

S3 ninja emulates the Amazon S3 API for developement and test purposes
MIT License
493 stars 91 forks source link

Virtual host address support #244

Open Piedone opened 7 months ago

Piedone commented 7 months ago

Do I understand correctly that S3 ninja doesn't support virtual-hosted–style buckets? See Virtual hosting of buckets. So, mybucket.localhost:9444 won't work, only localhost:9444/mybucket.

This is what I noticed: Using the official AWS .NET SDK, creating a bucket works with live S3 resource, but not with S3 ninja, I get the below exception:

Amazon.S3.AmazonS3Exception: 'The computed request signature does not match the one provided. Check login credentials. (Expected: c043d418554a7ff903aae7b71ced9e3f116b154ab22613e78ff8b25f779666fe, Found: 6acef5ac4da8c96b6c9872f85c95249e9a6216a8c3b4db7c39d1b490fa9793d7)'

Now this is the same as https://github.com/scireum/s3ninja/issues/240 but from the access logs it seems to me that even with that fixed it would fail, since the bucket name doesn't arrive to S3 ninja:

image

Mapping the container to the subdomain, like below from a Windows hosts file, doesn't help:

127.0.0.1 bucketname.localhost