You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ContainerRegistry: Remove Authorization header when redirecting on Linux (#167)
Motivation
----------
In #164, @herzi reported a problem building container images based on
`swift:slim` on Linux. The root cause of the problem is that Docker Hub
now redirects pulls for `swift:slim` to an S3 bucked behind CloudFlare.
URLSession on macOS follows the redirect correctly, but URLSession on
Linux incorrectly includes an `Authorization` header which S3 rejects.
Modifications
-------------
Add a URLSession delegate which removes the `Authorization` header when
following a redirect.
Result
------
Pulling `swift:slim` from Docker Hub works again.
Fixes: #166
Test Plan
---------
* #164 extended the end-to-end tests to use `swift:slim` as well as
`scratch`, demonstrating the problem. The extended tests now pass.
* All existing tests continue to pass.
0 commit comments