mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
Fix: sitemap.xml wrong method response
This commit is contained in:
@@ -6,7 +6,8 @@ import { getSiteMaps } from 'lib/get-site-maps'
|
||||
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
|
||||
if (req.method !== 'GET') {
|
||||
res.statusCode = 405
|
||||
res.write({ error: 'method not allowed' })
|
||||
res.setHeader("Content-Type", "application/json")
|
||||
res.write(JSON.stringify({ error: "method not allowed" }))
|
||||
res.end()
|
||||
return {
|
||||
props: {}
|
||||
|
||||
Reference in New Issue
Block a user