Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config: Add the read_only setting #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on May 8, 2023

  1. Refactor: Use BaseSettings of pydantic for configuration

    This is the recommended way as per the documentation of `fastapi` as it
    can be easily made available to routes.
    sphuber committed May 8, 2023
    Configuration menu
    Copy the full SHA
    520bd52 View commit details
    Browse the repository at this point in the history
  2. Config: Add the read_only setting

    This setting, which is set to `True` by default, will determine whether
    the instance is to be read-only. The `protected_methods_middleware`
    function is added as middleware to the application. If the `read_only`
    setting is `True` and the request method is `DELETE`, `PATCH`, `POST` or
    `PUT`, a `405 Method Not Allowed` response is returned.
    sphuber committed May 8, 2023
    Configuration menu
    Copy the full SHA
    c7aed7c View commit details
    Browse the repository at this point in the history