Skip to content

Commit

Permalink
fix: continue same behaviour for other private routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Oct 9, 2023
1 parent 552215f commit 340ca36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/functions/form-submissions-handler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getFormHandler = function ({ functionsRegistry }) {

export const createFormSubmissionHandler = function ({ functionsRegistry, siteUrl }) {
return async function formSubmissionHandler(req, res, next) {
if (req.method !== 'POST' || (await functionsRegistry.getFunctionForURLPath(req.url, req.method))) return next()
if (req.url.startsWith('/.netlify/') ||req.method !== 'POST' || (await functionsRegistry.getFunctionForURLPath(req.url, req.method))) return next()

const fakeRequest = new Readable({
read() {
Expand Down

0 comments on commit 340ca36

Please sign in to comment.