Improved Refish subroutes
- getSubroutes() is now a method of the Node class
- getSubroutes() is called only once per node at construction time,
not at each GET request
- template parameter removed from the Node class
Change-Id: Ie4eb8766717aae566c13c295458fe0dba8ab84c0
Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
diff --git a/include/webserver_common.hpp b/include/webserver_common.hpp
new file mode 100644
index 0000000..fcfd321
--- /dev/null
+++ b/include/webserver_common.hpp
@@ -0,0 +1,24 @@
+/*
+// Copyright (c) 2018 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+#pragma once
+
+#include "token_authorization_middleware.hpp"
+#include "webserver_common.hpp"
+
+using CrowApp = crow::App<crow::PersistentData::Middleware,
+ crow::TokenAuthorization::Middleware,
+ crow::SecurityHeadersMiddleware>;
+