diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-07 16:39:57 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-10 16:32:32 +0300 |
commit | d6cfc0042ed2ce9a33f31a6c44661c136e861b98 (patch) | |
tree | d96cc71bbe74bfc25c810f3680ee8a8ad2364681 /lib | |
parent | 68ab7047dae98172a0bd8b92956f2ee51b9167a0 (diff) |
Catch any undefined API routing and return 400 Bad Request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/api.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 0bbf73a1b63..95a64f14ac7 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -73,5 +73,9 @@ module API mount ::API::Triggers mount ::API::Users mount ::API::Variables + + route :any, '*path' do + error!('400 Bad Request', 400) + end end end |