Closed zooyoyo closed 6 months ago
Thanks for reporting, as from your config, WebP Server Go is listening on port 3333, you've said "When I click on a video link", are you visiting something like http://<some_ip_or_domain>:3333/path/to/some.mp4
?
Or is there any reverse proxy in front of WebP Server Go?
Yes, I used nginx for proxy. My video link is similar to this: http://10.0.2.189/group1/11.mp4?name=11.mp4&download=0 Nginx configuration: location /group1 { proxy_pass http://10.0.2.189:3333; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
Great, maybe you can try proxy_pass
only images to WebP Server Go(http://10.0.2.189:3333/
) while other requests proxy_pass
directly to your source(http://10.0.2.189:10001/
), an example Nginx config might like this(I haven't tested this config so I'm not sure whether it works as intended)
location ~* ^/group1/.*\.(?:jpg|jpeg|gif|png|svg|heic|bmp|nef|webp)$ {
proxy_pass http://10.0.2.189:3333;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /group1/ {
proxy_pass http://10.0.2.189:10001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
I tried it and it is correct. Currently, the link can be accessed normally; I need more tests, thank you!
Glad it helps, closing this issue now, if you need more help free feel to reopen this.
Describe the bug {
"HOST": "0.0.0.0", "PORT": "3333", "QUALITY": "80",
"MAX_JOB_COUNT": "10",
"IMG_PATH": "http://10.0.2.189:10001",
"EXHAUST_PATH": "/home/webp_server_go/cache",
"ALLOWED_TYPES": ["jpg","png","jpeg","bmp"] } When I click on a video link, I am unable to access it properly
To Reproduce Error : sendfile: file /home/webp_server_go/cache/local/90036d54bb8e9260 not found
Expected behavior A clear and concise description of what you expected to happen.
Screenshots and logs If applicable, add screenshots and logs to help explain your problem.
Environment (please complete the following information):
Additional context Add any other context about the problem here.