Commit bc4e58f0 authored by JJ Kasper's avatar JJ Kasper Committed by Tim Neutkens

Add query for debugging amp data (#6909)

This adds a query for debugging AMP bind init data
parent 08907972
......@@ -272,7 +272,7 @@ export default class Server {
const html = await this.renderToHTML(req, res, pathname, query, {
amphtml: query.amp && this.nextConfig.experimental.amp,
dataOnly: req.headers && (req.headers.accept || '').indexOf('application/amp.bind+json') !== -1,
dataOnly: this.renderOpts.ampBindInitData && Boolean(query.dataOnly) || (req.headers && (req.headers.accept || '').indexOf('application/amp.bind+json') !== -1),
})
// Request was ended by the user
if (html === null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment