sowe1
1
Dear community,
I'm trying to include a media file in this case a png and I've an error. I'm using this sample
DNS lookup xx.xx.xx.xx (family:4, host:domain) is not allowed. Because, It is private IP address.Código de error: 500
log for nginx
10.20.30.11 - - [13/Dec/2021:15:25:13 +0000] "GET /-/media/get/https/odk.palestinercs.org/v1/test/5NSXnL!BELSzuHlZJSOR6TFYhF4TVQfsd$br2W89!qcQuLef$miXS7uu4Y9txj7c/projects/6/forms/start_screen/draft/attachments/hands.png HTTP/1.1" 500 707 "https://odk.palestinercs.org/-/preview/aaNjX0rMovSUZrYzfzVqPPzc7XngrdT" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36"
Best
sowe1
2
Hi!
I'm reviewing the nginx configuration and the enketo configuration and I don't see this path.
Any idea?
Best and Merry Christmas
I asked a colleague about this. They gave the following response:
https://odk.palestinercs.org/v1/test/5NSXnL!BELSzuHlZJSOR6TFYhF4TVQfsd$br2W89!qcQuLef$miXS7uu4Y9txj7c/projects/6/forms/start_screen/draft/attachments/hands.png Exists as a direct URI. That local IP gives me a hint that a host file may have been created to point odk.palestinercs.org to a local IP, but the GET from ODK sees it and rejects it as a local address. I have never worked with ODK, so that’s a guess, but I would check DNS and host files on the server.
For example, if I swap it with a different image (https://odk.palestinercs.org/-/media/get/https/i.picsum.photos/id/229/200/200.jpg?hmac=b3V9uXS2Q1EA1tLHxvWjTgBF4TphN4ibxTjDv2PO2jg) it works fine. Think this is a DNS issue/host file issue.
I think this might fix it. In Enketo, allowPrivateIPAddress
is probably set to false
(default). https://enketo.github.io/enketo-express/tutorial-10-configure.html The actual error being seen is on like line 54 of https://github.com/enketo/enketo-express/blob/master/test/server/media-controller.spec.js#L54
sowe1
4
Hi !, Thanks for the feedback, I think we need to change the docker image or I need to change any properties.
Best