http: no Host in request URL
OS: Ubuntu 20
Error:
imgproxy_1 | ERROR [2022-08-01T15:26:58Z] Completed in 426.983µs /resize:fill:300:400:0/gravity:sm/plain/https:/domain.tld/exemple.jpg@png request_id=XYp1-tgKXCAOIeYnYZFSI method=GET status=500 client_ip=myip error="Can't download source image: Get \"https:/domain.tld/exemple.jpg\": http: no Host in request URL"
docker-compose.yml:
version: "3.7"
services:
app:
image: golang:bullseye
command: /bin/sh -c "go mod init && go mod tidy && go run main.go"
ports:
- "20100:8080"
environment:
- ACCESS_KEY=tsss
- ACCESS_SECRET=tsss
- IMG_UPLOAD_BUCKET=main
- IMGPROXY_PUBLIC_URL=https://domain.tld
# - IMGPROXY_SIGNING_KEY=tsss
# - IMGPROXY_SIGNING_SALT=tsss
- RESOURCE_ENDPOINT=http://minio:9000
- RESOURCE_REGION=eu-east-1
- IMGPROXY_ALLOWED_SOURCES=*
# - IMGPROXY_IGNORE_SSL_VERIFICATION
volumes:
- ./main.go:/go/src/app/main.go
working_dir: /go/src/app
depends_on:
- minio
- imgproxy
imgproxy:
image: darthsim/imgproxy:latest
hostname: imgproxy
ports:
- "20200:8080"
environment:
- AWS_ACCESS_KEY_ID=tsss
- AWS_SECRET_ACCESS_KEY=tsss
- IMGPROXY_PUBLIC_URL=https:/domain.tld
- IMGPROXY_ALLOWED_SOURCES=s3://,https://*,http://*
- IMGPROXY_DEVELOPMENT_ERRORS_MODE=true
# - IMGPROXY_KEY=tsss
- IMGPROXY_S3_ENDPOINT=http://minio:9000
- IMGPROXY_S3_REGION=eu-east-1
#- IMGPROXY_SALT=tsss
- IMGPROXY_USE_S3=true
- IMGPROXY_ALLOWED_SOURCES=*
# - IMGPROXY_IGNORE_SSL_VERIFICATION
links:
- minio
minio:
image: minio/minio
command: server /data --console-address ":9001"
ports:
- "20300:9000"
- "20400:9001"
environment:
- MINIO_DEFAULT_BUCKET=main
- MINIO_ROOT_PASSWORD=tsss
- MINIO_ROOT_USER=tsss
- MINIO_SITE_REGION=eu-east-1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
- data:/data
volumes:
data:
Hey @13MrBlackCat13!
https:/domain.tld/exemple.jpg does not has a domain indeed. It looks like something in front of imgproxy normalized your URL.
Hey @13MrBlackCat13!
https:/domain.tld/exemple.jpgdoes not has a domain indeed. It looks like something in front of imgproxy normalized your URL.
My img proxy is on the subdomain (imgproxy.domain.tld), but the images are on the main domain
What I meant to say is that an https URL should start with https://, not with https:/