Skip to content

Commit

Permalink
remove unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed May 29, 2024
1 parent 0dac7d9 commit 2da4db1
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions store/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse, Response
from fastapi.staticfiles import StaticFiles
from starlette.datastructures import Headers

from store.app.api.routers.main import api_router
from store.settings import settings
Expand Down Expand Up @@ -38,23 +37,6 @@ async def value_error_exception_handler(request: Request, exc: ValueError) -> JS
)


class NotModifiedResponse(Response):
NOT_MODIFIED_HEADERS = (
"cache-control",
"content-location",
"date",
"etag",
"expires",
"vary",
)

def __init__(self, headers: Headers):
super().__init__(
status_code=304,
headers={name: value for name, value in headers.items() if name in self.NOT_MODIFIED_HEADERS},
)


# Mounts the static frontend files to the /static path.
app.mount("/static", StaticFiles(directory=FRONTEND_STATIC_DIR, html=True), name="/static")

Expand Down

0 comments on commit 2da4db1

Please sign in to comment.