~qeef/damn-server

eba8cd9c4cecddade1b67c2b32fe444c7b9e94cd — Jiri Vlasak 1 year, 1 month ago 4506336
Add gzip to api for clients that support it
2 files changed, 3 insertions(+), 0 deletions(-)

M CHANGELOG.rst
M damn_server/api.py
M CHANGELOG.rst => CHANGELOG.rst +1 -0
@@ 19,6 19,7 @@ Added
- ``author`` to ``GET`` area(s) endpoints.
- ``map oldest`` and ``review oldest`` commit types for area commit ``POST``
  endpoint.
- Gzip for clients that support it.

Changed
-------

M damn_server/api.py => damn_server/api.py +2 -0
@@ 17,6 17,7 @@ from asyncpg.exceptions import SerializationError
from datetime import datetime
from dateutil import parser as dt_parser
from fastapi import Security
from fastapi.middleware.gzip import GZipMiddleware
from fastapi.security import HTTPAuthorizationCredentials
from fastapi.security import HTTPBearer
from pydantic import conint


@@ 72,6 73,7 @@ app.add_middleware(
    allow_methods=["GET", "POST", "PUT"],
    allow_headers=["Authorization", "Content-Type"],
)
app.add_middleware(GZipMiddleware)
osm = rauth.OAuth1Service(
    consumer_key=conf.OAUTH_CONSUMER_KEY,
    consumer_secret=conf.OAUTH_CONSUMER_SECRET,