1 comments

@James 2018-10-11 14:19:52

I ran into this same issue. Here's my solution:

const baseUrl = req.url
      .replace(
        event.pathParameters.proxy, // => returns api/your/path
        event.requestContext.path // => returns /production//api/your/path
      )
      .split('//') // fix the double-slashes (//)
      .join('/');

Related Questions

Sponsored Content

Sponsored Content