weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
2.05k stars 200 forks source link

How can I solve this error? #440

Open wg6uq8 opened 1 week ago

wg6uq8 commented 1 week ago

local install IP address blocked by policy . The hostname of the origin is unresolvable (DNS) or blocked by policy.

kleisauke commented 3 days ago

By default, access to loopback, link-local, multicast and private IP addresses is denied. https://github.com/weserv/images/blob/4133e2ff4745a2a70ca12e3113a5306e9e941efd/ngx_conf/nginx.conf#L119-L133

For self-hosted instances, you can remove those weserv_deny_ip nginx directives from your nginx.conf. For example, in Docker:

# Usage: 
# docker build -t weserv/images .
# docker run -d -p 8080:80 --shm-size=1gb --name=weserv weserv/images
FROM ghcr.io/weserv/images:5.x

RUN sed -i '/weserv_deny_ip/d' /etc/nginx/nginx.conf
wg6uq8 commented 2 days ago

Thank you so much