Skip to content

Add Access Log Middleware #43

Open

Description

@CannonLock

Add middleware to the website that logs all change requests.

I want to fill up the current access table with all requests that come from POST, PATCH, PUT, DELETE so that we can monitor what is changing our data.

I will also want a single endpoint that lists all of these requests so we can see them. No need for a web_ui at this point.

I have a table here that I made awhile back, but feel free to tweak.

https://github.com/CHTC/chtc-user-app-api/blob/50bfffc3523a83434a6635b6cd8f6686acb5dea8/userapp/core/models/tables.py#L194-L202

For instance we don't need a expires_at field and we should adjust the payload to use jsonb so we can search it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions