mongodb - You don't have the permission to access the requested resource in Python Eve -
when hitting rest endpoint delete (http://localhost:5000/tax/559c0180b9f1f1072f240065), receive error. error follows. tax collection i'm attempting delete , following value in url id of document i'd deleted. status 403 forbidden show explanation loading time: 7 request headers accept: application/json origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo csp: active user-agent: mozilla/5.0 (macintosh; intel mac os x 10_10_3) applewebkit/537.36 (khtml, gecko) chrome/43.0.2357.130 safari/537.36 content-type: application/x-www-form-urlencoded accept-encoding: gzip, deflate, sdch accept-language: en-us,en;q=0.8 response headers content-type: application/json content-length: 180 server: eve/0.6-dev0 werkzeug/0.10.4 python/2.7.6 date: tue, 07 jul 2015 16:46:40 gmt
{ _status: "err" _error: { message: "you don't have permission access requested resource. either read-protected or not readable server." code: 403 }- } payload used {"kong": "donkey"}
what can resolve issue?
the code used @ following links
https://gist.github.com/anonymous/fda6080f3e7910d4be84 https://gist.github.com/anonymous/3bab73901f901087177b
you need provide if-match header (along document etag) request. see data integrity , concurrency control. default etags required edit operations, can opt-out setting if-match false:
if use case requires, can opt disable concurrency control. etag match checks can disabled setting if_match configuration variable false (see global configuration). when concurrency control disabled no etag provided responses. should careful disabling feature, open api risk of older versions replacing documents.
Comments
Post a Comment