imageproxy icon indicating copy to clipboard operation
imageproxy copied to clipboard

Requested URL is not allowed

Open hector-espillco opened this issue 1 year ago • 2 comments

I am having some problems with this url: https://eas-images.fisglobal.com/abcui/images/12040000/BylineLogo175by60.png This is returning "requested URL is not allowed".

I was using the docker image to see the log with the following url : http://localhost:8080/st8P_RbasuRqBEbx5mMVtsap2YQthkKlywvTAdXnb_rI=/https://eas-images.fisglobal.com/abcui/images/12040000/BylineLogo175by60.png

The log shows me the following: image: unknown format

Please, Could you help me with that?

hector-espillco avatar Aug 23 '24 00:08 hector-espillco

I can't seem to reproduce this. I've run imageproxy locally and with Docker:

$ go run ./cmd/imageproxy 

$ podman run -p 8080:8080 ghcr.io/willnorris/imageproxy

And the image loads fine for both: http://localhost:8080/x/https://eas-images.fisglobal.com/abcui/images/12040000/BylineLogo175by60.png

I see that you have a signature, so I tried both with an allowHosts and signatureKey:

$ go run ./cmd/imageproxy -allowHosts example.com -signatureKey secret

$ podman run -p 8080:8080 ghcr.io/willnorris/imageproxy -addr 0.0.0.0:8080 -allowHosts example.com -signatureKey secret

I used cmd/imageproxy-sign to generate the signature and that still works both with the straight CLI and docker image: http://localhost:8080/s6GeXAXzX_KboT2v6V2J3JAqY09-4JuhOz5m7oKl-o4M=/https://eas-images.fisglobal.com/abcui/images/12040000/BylineLogo175by60.png

One thing to note is that the default CMD in the docker file specifies the addr flag, so I had to add that to my flags above.

Could you share exactly how you're running the docker image (minus secret values of course)?

willnorris avatar Jun 30 '25 18:06 willnorris

I have seen this error, too. i.e. first load ->

Log: error transforming image https://static.eu.hurley.com/media/catalog/product/h/a/HATSDR1000_H100_00.jpg#0x500: image: unknown format content-type not allowed: "text/html"

starting with -contentTypes "image/*"

force refresh in the browser will make it load however.

apunkt avatar Sep 29 '25 15:09 apunkt