Skip to content

Commit

Permalink
Added template to security ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelloeater committed Jul 30, 2023
1 parent b2274df commit 6d1ea2d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 9 additions & 5 deletions fedi_gatus/api_server/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class web_app:
def __init__(self):
self.app = FastAPI(debug=True)

@self.app.get('/', include_in_schema=False)
@self.app.get("/", include_in_schema=False)
async def root():
return RedirectResponse(self.app.docs_url)

@self.app.get(
f'/healthcheck', # For AutoDocs
"/healthcheck", # For AutoDocs
responses={
status.HTTP_200_OK: {"description": "Connection to DB OK"},
status.HTTP_503_SERVICE_UNAVAILABLE: {
Expand Down Expand Up @@ -50,9 +50,13 @@ def local_nic(cls):
@classmethod
def start_server(cls): # pragma: no cover # TODO Remove when test fixed
u = uvicorn
c = u.config.Config(app=web_app().app, host=cls.local_nic(), port=cls.port, proxy_headers=True,
# root_path="/api/v1"
)
c = u.config.Config(
app=web_app().app,
host=cls.local_nic(),
port=cls.port,
proxy_headers=True,
# root_path="/api/v1"
)
w = u.Server(c)
w.run()

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exclude-path-patterns = [
# To not have to escape `\` in regexes, use single quoted
# TOML 'literal strings'
{path-pattern = 'docs/source/(.*)\.rst'},
{path-pattern = 'fedi_gatus/config_gen/base.template.yaml'},
]
exclude-entropy-patterns = [
{path-pattern = '\.github/workflows/.*\.yml', pattern = 'uses: .*@[a-zA-Z0-9]{40}', reason = 'GitHub Actions'},
Expand Down

0 comments on commit 6d1ea2d

Please sign in to comment.