mirror of https://gitlab.com/bashrc2/epicyon
Allow inbox url domain to differ from instance domain when sending signed json
A workaround for wordpressmerge-requests/30/head
parent
c74b3a9af0
commit
8ff0ec6114
11
posts.py
11
posts.py
|
@ -3229,6 +3229,17 @@ def send_signed_json(post_json_object: {}, session, base_dir: str,
|
||||||
' in ' + base_dir + '/keys/private')
|
' in ' + base_dir + '/keys/private')
|
||||||
return 6
|
return 6
|
||||||
|
|
||||||
|
# NOTE: the inbox domain being sent to isn't always the same
|
||||||
|
# as the destination instance domain. eg public-api.wordpress.com
|
||||||
|
# rather than the wordpress instance domain
|
||||||
|
inbox_url_domain, _ = get_domain_from_actor(inbox_url)
|
||||||
|
if inbox_url_domain:
|
||||||
|
if inbox_url_domain != to_domain:
|
||||||
|
print('send_signed_json ' +
|
||||||
|
'inbox domain is not the same as instance domain ' +
|
||||||
|
inbox_url_domain + ' != ' + to_domain)
|
||||||
|
to_domain = inbox_url_domain
|
||||||
|
|
||||||
if to_domain not in inbox_url:
|
if to_domain not in inbox_url:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: send_signed_json ' +
|
print('DEBUG: send_signed_json ' +
|
||||||
|
|
Loading…
Reference in New Issue