Skip to content

Commit

Permalink
chore: change func template to remove callback (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsaylevine authored Jun 3, 2021
1 parent 878acab commit 056767e
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 056767e

Please sign in to comment.