首页 \ 问答 \ 如何在hapijs中禁用生产服务器上的swagger API文档(How to disable swagger API documentation from production server in hapijs)

如何在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
更新时间:2023-11-08 22:11

最满意答案

我相信我现在知道什么是删除我的可执行文件。 这不是我想到的,所以我与大家分享了答案。 今天,我收到了我们首席安全官的电子邮件,告诉我我写的程序被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 并拥有合适的用户( ...
  • 是的,所有这些都是为您处理的。 仅当您的功能成功完成时,才会删除队列消息。 在此之前,当您的函数正在运行时,队列消息将保持不可见,因此没有其他人选择它进行处理。 如果您的功能失败,该消息将在短时间内可见,以便可以处理。 如果队列消息失败处理可配置的次数(默认为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超时,我可以调用它? 您可以异步读取控制台输入: #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 ...
  • 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 ...
  • 您可以查看第三方应用程序,其中一些是在类似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? ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。