SourceURL() previously hardcoded https:// regardless of the AllowHTTP
config setting. This made testing with HTTP-only test servers impossible.
Add AllowHTTP field to ImageRequest and use it to determine the URL
scheme. The Service propagates the config setting to each request.
Fixes#1
Merge conflicts resolved (rebased onto main). Both the AllowHTTP propagation and the negative cache check from PR#8 are preserved.
Test only (no fix): FAIL
# sneak.berlin/go/pixa/internal/imgcache [sneak.berlin/go/pixa/internal/imgcache.test]
internal/imgcache/sourceurl_test.go:23:3: unknown field AllowHTTP in struct literal of type ImageRequest
internal/imgcache/sourceurl_test.go:37:3: unknown field AllowHTTP in struct literal of type ImageRequest
FAIL sneak.berlin/go/pixa/internal/imgcache [build failed]
FAIL
Test + fix: PASS
ok sneak.berlin/go/pixa/internal/config
ok sneak.berlin/go/pixa/internal/encurl
ok sneak.berlin/go/pixa/internal/handlers
ok sneak.berlin/go/pixa/internal/imgcache
ok sneak.berlin/go/pixa/internal/middleware
ok sneak.berlin/go/pixa/internal/seal
ok sneak.berlin/go/pixa/internal/session
Lint & formatting: PASS
gofmt -l . reports no issues. go vet ./... passes.
Merge conflicts resolved (rebased onto main). Both the AllowHTTP propagation and the negative cache check from PR#8 are preserved.
### Test only (no fix): FAIL
```
# sneak.berlin/go/pixa/internal/imgcache [sneak.berlin/go/pixa/internal/imgcache.test]
internal/imgcache/sourceurl_test.go:23:3: unknown field AllowHTTP in struct literal of type ImageRequest
internal/imgcache/sourceurl_test.go:37:3: unknown field AllowHTTP in struct literal of type ImageRequest
FAIL sneak.berlin/go/pixa/internal/imgcache [build failed]
FAIL
```
### Test + fix: PASS
```
ok sneak.berlin/go/pixa/internal/config
ok sneak.berlin/go/pixa/internal/encurl
ok sneak.berlin/go/pixa/internal/handlers
ok sneak.berlin/go/pixa/internal/imgcache
ok sneak.berlin/go/pixa/internal/middleware
ok sneak.berlin/go/pixa/internal/seal
ok sneak.berlin/go/pixa/internal/session
```
### Lint & formatting: PASS
`gofmt -l .` reports no issues. `go vet ./...` passes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Merge conflicts resolved (rebased onto main). Both the AllowHTTP propagation and the negative cache check from PR#8 are preserved.
Test only (no fix): FAIL
Test + fix: PASS
Lint & formatting: PASS
gofmt -l .reports no issues.go vet ./...passes.please fix the merge conflicts
06ef2d0c88to18a048a69e18a048a69eto40c4b53b01