Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/templates/functionBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Render function for the Next.js page
const renderNextPage = require('./renderNextPage')

const base = async (event, context, callback) => {
const base = async (event, context) => {
// x-forwarded-host is undefined on Netlify for proxied apps that need it
// fixes https://github.com/netlify/next-on-netlify/issues/46
if (!event.multiValueHeaders.hasOwnProperty('x-forwarded-host')) {
Expand All @@ -26,7 +26,7 @@ const base = async (event, context, callback) => {

response.multiValueHeaders['Cache-Control'] = ['no-cache']

callback(null, response)
return response
}

module.exports = base