Mitra Fixes (#207)
Don't send a list when populating Accept header. This seems to work fine on Mastodon and friends, and fixes a bug with the Mitra server until resolved upstream.
This commit is contained in:
parent
3544aa0c8b
commit
cfa97b9740
|
@ -20,7 +20,7 @@ def sanitize_post(post_html: str) -> str:
|
|||
Only allows a, br, p and span tags, and class attributes.
|
||||
"""
|
||||
cleaner = bleach.Cleaner(
|
||||
tags=["br", "p"],
|
||||
tags=["br", "p", "a"],
|
||||
attributes={ # type:ignore
|
||||
"a": allow_a,
|
||||
"p": ["class"],
|
||||
|
|
|
@ -200,7 +200,7 @@ class HttpSignature:
|
|||
body_bytes = b""
|
||||
# GET requests get implicit accept headers added
|
||||
if method == "get":
|
||||
headers["Accept"] = "application/activity+json, application/ld+json"
|
||||
headers["Accept"] = "application/activity+json"
|
||||
# Sign the headers
|
||||
signed_string = "\n".join(
|
||||
f"{name.lower()}: {value}" for name, value in headers.items()
|
||||
|
|
|
@ -3,6 +3,8 @@ ARG IMAGE_LABEL=3.11.1-slim-buster
|
|||
|
||||
FROM ${IMAGE_HOST}:${IMAGE_LABEL}
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libpq5 \
|
||||
|
|
Loading…
Reference in New Issue