Florian Maxim
Florian Maxim
```javascript const prompts = require('./'); let questions = [ { type: 'text', name: 'name', message: 'What is your name?' }, { type: 'number', name: 'age', message: 'How old are you?'...
Hm, do you maybe see any issue in my nginx handler ? `location /api/ { proxy_pass_header Server; proxy_set_header Host $http_host; proxy_set_header X-Scheme $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect...
@chentsulin Ah, wait it always comes with a second error: ErrorUrl | "https://xxxxxx.dev/api/webhooks/whatsapp" -- | -- SmsMessageSid | "SM849483eda06exxxxxx" ErrorCode | "11200" NumMedia | "0" SmsSid | "SM849483eda06e945xxxxxx" SmsStatus |...
The server app is as reduced as this: ` const server = express(); server.set('trust proxy'); const verify = (req, _, buf) => { req.rawBody = buf.toString(); }; server.use(bodyParser.json({ verify }));...
Thank you so much for the update! I updated bottender to 1.4.7 as well as the NGINX server block: ` proxy_pass http://nodejs:3000/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto...
here is the log: `"headers": { "x-real-ip":"54.242.136.XXX", "x-forwarded-for":"54.242.136.XXX", "x-forwarded-proto":"https", "host":"hn-bot.dev", "x-forwarded-host":"XXX.dev", "x-forwarded-port":"443", "connection":"close", "content-length":"318", "content-type":"application/x-www-form-urlencoded", "x-twilio-signature":"9gsseAIhctS18mbe7dErVXXXXXXXXX", "i-twilio-idempotency-token":"8f13d9ea-4884-4b81-8dd9-7XXXXXXXXX", "accept":"*/*", "cache-control":"max-age=259200", "user-agent":"TwilioProxy/1.1" }" hostname: XXX.dev protocol: http requestUrl http://XXX.dev/webhooks/whatsapp` So I guess...
@chentsulin Ah, damn it, my bad! I changed it and now it matches: "x-forwarded-proto":"https" and `protocol: https` matches. But I just realized the url ending `/api/` is getting lost on...
I already tried. `originalUrl /webhooks/whatsapp` doesnt include the path as well.. It is not supposed to be included in the `bottender.config.js`, or is it? ` whatsapp: { enabled: true, path:...
> How about adding `$request_uri` in your nginx config `proxy_pass` part? > http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass >  It's already inside a location block: `location /api/ { proxy_pass http://nodejs:3000;` So I'm relatively sure...
@tw0517tw Ah, it has to be included on the proxy header as well, ofc! `proxy_set_header Host $host$request_uri;` `proxy_set_header X-Forwarded-Host $host$request_uri;` EDIT: Which is actually **not a soluction**, since modifiying the...