如何在生产模式下禁用strapi graphql操场
我已经将此摘要添加到./ config/plugins.js
中,
module.exports = {
graphql: {
enabled: true,
config: {
endpoint: "/graphql",
shadowCRUD: true,
playgroundAlways: process.env.NODE_ENV === "development",
depthLimit: 50,
amountLimit: 100,
defaultLimit: 100,
maxLimit: 100,
apolloServer: {
tracing: true,
},
},
},
ckeditor: true,
};
I also have changed `playgroundAlways` value like this:
playgroundAlways:false
但是我可以在开发和生产模式下看到GraphQl Playground。
如何隐藏或禁用GraphQl操场?
I've added this snippet into ./config/plugins.js
module.exports = {
graphql: {
enabled: true,
config: {
endpoint: "/graphql",
shadowCRUD: true,
playgroundAlways: process.env.NODE_ENV === "development",
depthLimit: 50,
amountLimit: 100,
defaultLimit: 100,
maxLimit: 100,
apolloServer: {
tracing: true,
},
},
},
ckeditor: true,
};
I also have changed `playgroundAlways` value like this:
playgroundAlways:false
But I can see graphql playground in development and production mode.
How can I hide or disable graphql playground?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何定义开始应用程序脚本?
您是否设置node_env =生产?
要仔细检查设置断点或控制台。
How are the start app script defined?
Are you setting the NODE_ENV=production?
To double check set a breakpoint or console.log
process.env
variable to see what you are getting at the runtime.