diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 15:02:24 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-01 15:02:24 +0700 |
| commit | 58505e79a0b39addf4d4102c0849733b27869ee1 (patch) | |
| tree | b3d7dff7b2f69daf7166a6332549f5c2b6b16e0b /indoteknik_api/controllers | |
| parent | b2ce57972c1b9d90590fa6bfd6aca31e87c5c559 (diff) | |
delete cors
Diffstat (limited to 'indoteknik_api/controllers')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/product.py | 2 | ||||
| -rw-r--r-- | indoteknik_api/controllers/controller.py | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/indoteknik_api/controllers/api_v1/product.py b/indoteknik_api/controllers/api_v1/product.py index 975c81c6..d8006873 100644 --- a/indoteknik_api/controllers/api_v1/product.py +++ b/indoteknik_api/controllers/api_v1/product.py @@ -84,7 +84,7 @@ class Product(controller.Controller): return self.response(data) - @http.route(prefix + 'product/<id>/similar', auth='public', methods=['GET', 'OPTIONS'], cors='*') + @http.route(prefix + 'product/<id>/similar', auth='public', methods=['GET']) def get_product_similar_by_id(self, **kw): if not self.authenticate(): return self.response(code=401, description='Unauthorized') diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py index 3d3ce951..c02f6b60 100644 --- a/indoteknik_api/controllers/controller.py +++ b/indoteknik_api/controllers/controller.py @@ -50,11 +50,7 @@ class Controller(http.Controller): response.update({'result': data}) response = json.dumps(response) - return request.make_response(response, [ - ('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization, db, password, username'), - ('Access-Control-Allow-Origin', '*'), - ('Content-Type', 'application/json') - ]) + return request.make_response(response, [('Content-Type', 'application/json')]) def search_filter(self, model: str, kw: dict, query: array = []): """ To search data by default API Params if exist """ |
