Saturday 8 April 2017

Help request: Koa routes broken with HTTPS

Hey guys, banging my head against the wall and hoping someone can help. I'm setting up HTTPS on my koa2 API with letsencrypt, using the last part of this DigitalOcean guide. I'm using a nginx reverse proxy. Everything works fine with HTTP but with HTTPS my routes are broken, and I'm having a hard time finding the cause. For example, with plain HTTP, making a request to http://ift.tt/2nrEngs, I'd see a request looking something like{ request: { method: 'GET', url: '/api/some-route', header: { 'origin': 'https://myapi.com', accept: '*/*' } }With HTTPS it looks like { request: { method: 'GET', url: '//some-route', header: {accept: '*/*' } } The request.url is funky and the origin header is missing. I'm wondering if it's an issue with my nginx config, but having a hard time figuring out where to start.

Submitted April 08, 2017 at 07:00PM by harumphfrog

No comments:

Post a Comment