Skip to content

How to prevent GET requests logging only?  #919

@eduardopezzi

Description

@eduardopezzi
import hug
from threading import Thread
from src.libs.versionMiddleware import VersionMiddleware

api = hug.API(__name__)
api.http.add_middleware(
    hug.middleware.CORSMiddleware(api, allow_origins=["*"])
)
api.http.add_middleware(
    VersionMiddleware('prometheus-version')
)

Implementing HUG API I am trying to prevent the GET requests output at the container logs/prompt

I tried to make a custom middleware without success... any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions