repman-io / repman

Repman - PHP Repository Manager: packagist proxy and host for private packages
https://repman.io
MIT License
513 stars 106 forks source link

Add path style endpoints #607

Closed xvilo closed 1 year ago

xvilo commented 2 years ago

Some S3 providers only work with “Path Style Endpoints”. Normally, the S3 API requests are sent to {bucket}.{host}.{tld}. But with Path Style Endpoints, the API requests are sent to {host}.{tld}/{bucket}.

This introduces a new environment variable called STORAGE_AWS_PATH_STYLE_ENDPOINT which will evaluate to a boolean value. If this is not set, null will be used as a fallback and old/current behaviour is used.

Some background: Up until now we were using a CEPH provided S3 implementation as storage backend. However, due to instabilities of this platform we've decided to start using an OpenStack provided S3 implementation, which requires path styles.

codecov[bot] commented 2 years ago

Codecov Report

Merging #607 (0da99ec) into master (f82251f) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Current head 0da99ec differs from pull request most recent head 6951b14. Consider uploading reports for the commit 6951b14 to get more accurate results

@@            Coverage Diff            @@
##             master     #607   +/-   ##
=========================================
  Coverage     99.16%   99.16%           
  Complexity     1910     1910           
=========================================
  Files           301      301           
  Lines          6072     6074    +2     
=========================================
+ Hits           6021     6023    +2     
  Misses           51       51           
Impacted Files Coverage Δ
src/Service/Integration/Aws/S3AdapterFactory.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.