forked from LBRYCommunity/lbry-sdk
fix jsonrpc http headers
This commit is contained in:
parent
003b3df378
commit
92d423aefd
1 changed files with 2 additions and 1 deletions
|
@ -114,7 +114,8 @@ class AuthJSONRPCServer(AuthorizedBase):
|
||||||
def _set_headers(self, request, data, update_secret=False):
|
def _set_headers(self, request, data, update_secret=False):
|
||||||
if conf.settings['allowed_origin']:
|
if conf.settings['allowed_origin']:
|
||||||
request.setHeader("Access-Control-Allow-Origin", conf.settings['allowed_origin'])
|
request.setHeader("Access-Control-Allow-Origin", conf.settings['allowed_origin'])
|
||||||
request.setHeader("Content-Type", "text/json")
|
request.setHeader("Content-Type", "application/json")
|
||||||
|
request.setHeader("Accept", "application/json-rpc")
|
||||||
request.setHeader("Content-Length", str(len(data)))
|
request.setHeader("Content-Length", str(len(data)))
|
||||||
if update_secret:
|
if update_secret:
|
||||||
session_id = request.getSession().uid
|
session_id = request.getSession().uid
|
||||||
|
|
Loading…
Reference in a new issue