소스 검색

For be user friendly, we disable hard check of content_type

Bastien Sevajol (Algoo) 8 년 전
부모
커밋
ab83bc936a
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      tracim/tracim/controllers/api.py

+ 3 - 2
tracim/tracim/controllers/api.py 파일 보기

@@ -29,8 +29,9 @@ abort(
29 29
 
30 30
 class APIBaseController(BaseController):
31 31
     def _before(self, *args, **kw):
32
-        if request.content_type != 'application/json':
33
-            abort(406, 'Only JSON requests are supported')
32
+        # For be user friendly, we disable hard check of content_type
33
+        # if request.content_type != 'application/json':
34
+        #     abort(406, 'Only JSON requests are supported')
34 35
 
35 36
         super()._before(*args, **kw)
36 37