Comments (5)
No problem 😉, I've also updated documentation (webp-sh/docs.webp.sh@ac53f80) to make it clearer for users to read.
from webp_server_go.
Thanks for feedback, could you add some more details about this issue:
- What's your original image address, is it
https://test-media.ams3.digitaloceanspaces.com/image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg
? - What are the logs from WebP Server Go after executing cURL command.
from webp_server_go.
-
I upload image to another bucket
-
In docker logs I have only two lines
time="2023-09-26 15:08:33" level=info msg="WebP Server Go ready." func="[46:main.setupLogger]"
WebP Server Go is Running on http://127.0.0.1:3333
Current config
{
"HOST": "127.0.0.1",
"PORT": "3333",
"QUALITY": "80",
"IMG_PATH": "/opt/pics",
"IMG_MAP": {
"http://test.mydomain.com": "https://bf-test-media.ams3.digitaloceanspaces.com"
},
"EXHAUST_PATH": "/opt/exhaust",
"ALLOWED_TYPES": ["jpg","png","jpeg","bmp","gif","svg"],
"ENABLE_EXTRA_PARAMS": true
}
My curl that I run on docker host:
curl -H 'Host: test.mydomain.com' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' http://127.0.0.1:3333/image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg -v
Curl response is
* Trying 127.0.0.1:3333...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 3333 (#0)
> GET /image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg HTTP/1.1
> Host: test.mydomain.com
> User-Agent: curl/7.68.0
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
>
* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
curl: (52) Empty reply from server
from webp_server_go.
Oh, I think I got the reason!
Your config is written "HOST": "127.0.0.1",
, thus WebP Server is listening on http://127.0.0.1:3333
inside your container, thus it's not able to serve requests from outside of the container.
You should change "HOST": "127.0.0.1",
to "HOST": "0.0.0.0",
.
I've tested and it's working after changing HOST.
curl -H 'Host: test.mydomain.com' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' http://127.0.0.1:3333/image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
Logs from WebP Server Go:
time="2023-09-26 15:35:56" level=info msg="Remote Addr is https://bf-test-media.ams3.digitaloceanspaces.com/image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg, pinging for info..." func="[81:webp_server_go/handler.fetchRemoteImg]"
time="2023-09-26 15:35:57" level=warning msg="can't read metadata: open metadata/bf-test-media.ams3.digitaloceanspaces.com/16da62fb3a2c526b.json: no such file or directory" func="[36:webp_server_go/helper.ReadMetadata]"
time="2023-09-26 15:35:57" level=info msg="Remote file not found in remote-raw, re-fetching..." func="[88:webp_server_go/handler.fetchRemoteImg]"
time="2023-09-26 15:35:58" level=info msg="WebP@80%: remote-raw/bf-test-media.ams3.digitaloceanspaces.com/16da62fb3a2c526b->/opt/exhaust/bf-test-media.ams3.digitaloceanspaces.com/16da62fb3a2c526b.webp 87721->47028 53.61% deflated" func="[295:webp_server_go/encoder.convertLog]"
time="2023-09-26 15:35:58" level=warning msg="/opt/exhaust/bf-test-media.ams3.digitaloceanspaces.com/16da62fb3a2c526b.avif not found on filesystem" func="[174:webp_server_go/helper.FindSmallestFiles]"
- [2023-09-26 15:35:56] GET /image/thumbnail/0000120d-0ce3-4daa-b8e1-f460d88e0fb7.jpg 200 curl/8.0.1
from webp_server_go.
@n0vad3v Yes, now it work's... but I have no idea how to figure that out without your help
from webp_server_go.
Related Issues (20)
- -dump-config flag does not work with Docker image HOT 2
- Empty file causes runtime error when it is expected to be a directory HOT 2
- Requests with too large headers fields are not logged HOT 4
- NEF image size is wrong and extra parameters are invalid HOT 5
- Delete older files from storage HOT 2
- Clear older files autometically HOT 2
- Image not found! HOT 2
- Readme broken link HOT 1
- Exclude certain sub folder HOT 1
- A problem converting GIF images to AVIF format HOT 6
- set maxWidth and/or maxHeight HOT 9
- When the instantaneous request volume is large, a large amount of CPU and memory will be consumed. HOT 1
- Couldn't load xx.ico file HOT 3
- How do I configure and exclude links in MP4 format? HOT 5
- Server don't conversions images to jxl format in Firefox Nightly HOT 3
- Cropping mode environment variable HOT 4
- Directory traversal with malformed HTTP request HOT 3
- Webp Cloud是不是比开源的这个支持更多功能? HOT 1
- 多路径域名识别错误 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webp_server_go.