如何在hapijs中禁用生产服务器上的swagger API文档(How to disable swagger API documentation from production server in hapijs)
我正在使用针对API的hapijs和swagger插件。 我需要在生产服务器上推送我的代码,但我不知道如何在不影响我的API功能的情况下禁用Swagger API文档UI。
i am working with hapijs and swagger plugin for API's. I need to push my code on production server but i don't know how exactly i can disable Swagger API Documentation UI without affecting my API's functionality.
原文:https://stackoverflow.com/questions/48960774
最满意答案
我相信我现在知道什么是删除我的可执行文件。 这不是我想到的,所以我与大家分享了答案。 今天,我收到了我们首席安全官的电子邮件,告诉我我写的程序被Symantec Endpoint Protection阻止。 在我的测试中,我会一遍又一遍地运行我的应用程序。 经过几次迭代后,它就会消失。 我没有想到,这可能是我们的公司AV。 现在看起来好像是发生了什么事情。
谢谢大家对我的建议,试图帮助我解决这个问题。 我希望如果有其他人遇到这个问题,他们可能会考虑将他们的AV作为他们写的应用消失的原因。
I believe I now know what was deleting my executable. It wasn't something I thought of, so I'm sharing with everyone the answer. Today I got an email from our chief security officer, informing me that the program I wrote was being blocked by Symantec Endpoint Protection. In my testing I'd run my app over and over again. After a few iterations of that it would disappear. It didn't occur to me that it was our corporate AV that might be doing it. Now it looks as though that is exactly what was going on.
Thank you everyone for your input in trying to help me resolve this. I hope that if anyone else encounters this problem they might consider the possibility of their AV as the reason why the app they wrote disappears.
相关问答
更多-
假设你的模型派生自ActiveRecord::Base并命名为User ,那么你可以使用rails console pp User.all # all users 要么 pp User.all(:conditions => {:firstname => 'fred'}) # use hash conditions 要么 pp User.all(:conditions => "lastname LIKE 'jenkin%'") # use custom sql conditions 并拥有合适的用户( ...
-
WebJob控制台应用程序中的ProcessQueueMessage函数(ProcessQueueMessage function in WebJob console app)[2024-03-04]
是的,所有这些都是为您处理的。 仅当您的功能成功完成时,才会删除队列消息。 在此之前,当您的函数正在运行时,队列消息将保持不可见,因此没有其他人选择它进行处理。 如果您的功能失败,该消息将在短时间内可见,以便可以处理。 如果队列消息失败处理可配置的次数(默认为5),则将消息移动到毒性队列 。 如果您有高级需求并需要深入插入SDK队列处理管道,则可以实现并注册自己的自定义QueueProcessor实例,以覆盖/自定义消息处理的各个部分。 有关详细信息,请参阅此示例 。 Yes, all of that is ... -
输出实际上是DOES转到“控制台” - 你只是看不到控制台窗口。 即如果你试图从另一个程序读取程序的标准输出,你会看到你打印到控制台的所有数据。 如果您确实想要查看控制台窗口,请将应用程序更改为控制台应用程序。 (您仍然可以像在Windows应用程序中一样运行表单和所有内容。) The output in fact DOES go to the "console" -- you just don't see the console window. I.e. if you tried to read the ...
-
如何在关闭它时在控制台应用程序中中止getchar(How to abort getchar in a console application when closing it)[2023-07-22]
也许有某种类型的getchar超时,我可以调用它? 您可以异步读取控制台输入: #ifdef WIN32 #include#else #include #include #include #include #endif int main(int argc, char* argv[]) { while(1) { #ifdef WIN32 if (kbhit()){ retur ... -
你是否在使用类似生产中的偏执狂宝石软删除用户记录? 如果是这样,请尝试User.with_deleted.where(:email=>"asdf@example.com") ,如果返回结果,则将用户的电子邮件地址更改为不存在的地址。 Are you using something like the Paranoia gem in production to soft-delete User records? If so, try User.with_deleted.where(:email=>"asdf@e ...
-
我相信我现在知道什么是删除我的可执行文件。 这不是我想到的,所以我与大家分享了答案。 今天,我收到了我们首席安全官的电子邮件,告诉我我写的程序被Symantec Endpoint Protection阻止。 在我的测试中,我会一遍又一遍地运行我的应用程序。 经过几次迭代后,它就会消失。 我没有想到,这可能是我们的公司AV。 现在看起来好像是发生了什么事情。 谢谢大家对我的建议,试图帮助我解决这个问题。 我希望如果有其他人遇到这个问题,他们可能会考虑将他们的AV作为他们写的应用消失的原因。 I believe ...
-
按psr-4 2.6 所有的类名必须以区分大小写的方式引用。 和3.3 终止类名称对应于以.php结尾的文件名。 文件名必须匹配终止类名的大小写。 尝试将auth重命名为Auth 。 更新: 只是注意到你在manager.php中的使用声明是错误的。 尝试: require "vendor/autoload.php"; use Vee\Auth\Author\Author; print (new Author())->write(); 另外,即使从构造函数返回字符串,也无法回显类。 By psr-4 ...
-
处理控制台应用程序(Handle in a console app)[2022-07-12]
IntPtr hdc = GetDC(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle); 适用于.Net控制台应用程序就好了。 我不相信null会在.Net中起作用,因为它会踢错误,参数:无法从''转换为'System.IntPtr' IntPtr hdc = GetDC(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle); works i ... -
不,数据存储浏览器是只读的。 但是,在该页面上,您可以在浏览器的控制台中执行JavaScript来执行此操作。 例如 datastore_manager.deleteDatastore('default'); No, the datastore browser is read-only. But, on that page, you could execute JavaScript in your browser's console to do it. E.g. datastore_manager.dele ...
-
安排控制台应用程序(Scheduling console apps)[2022-08-08]
您可以查看第三方应用程序,其中一些是在类似Cron的Windows系统中建议的? 。 但是,如果Windows Scheduler确实提供了您需要的功能,但只是不是理想的管理,那么您可以查看使用CLI schtasks.exe 您可以在XML模式中定义所有任务,这意味着它们可以更轻松地跨机器移植。 There are third party apps you could look at, some of which are suggested in Cron-like system for Windows? ...