Merge "Reporting docker deployment improvement"
[releng.git] / utils / test / reporting / api / api / handlers / __init__.py
1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from tornado.web import RequestHandler
10
11
12 class BaseHandler(RequestHandler):
13     def _set_header(self):
14         self.set_header('Access-Control-Allow-Origin', '*')
15         self.set_header('Access-Control-Allow-Headers',
16                         'Content-Type, Content-Length, Authorization, \
17                         Accept, X-Requested-With , PRIVATE-TOKEN')
18         self.set_header('Access-Control-Allow-Methods',
19                         'PUT, POST, GET, DELETE, OPTIONS')