Skip to content

Commit

Permalink
Merge pull request #19916 from strapi/v5/graphql-get
Browse files Browse the repository at this point in the history
chore: allow graphql get request with authentication
  • Loading branch information
alexandrebodin committed Mar 26, 2024
2 parents fd7c075 + 198c650 commit 2c602ff
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/plugins/graphql/server/src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ export async function bootstrap({ strapi }: { strapi: Core.Strapi }) {
},
};

// allow graphql playground to load without authentication
// WARNING: this means graphql should not accept GET requests generally
// TODO: find a better way and remove this, it is causing issues such as https://github.com/strapi/strapi/issues/19073
if (ctx.request.method === 'GET') {
return next();
}

return strapi.auth.authenticate(ctx, next);
});

Expand Down

0 comments on commit 2c602ff

Please sign in to comment.