Merge commit '46171b4f24f2ddc3b9212b9ad6769925bcaceb03' into feature/site-features-and-mockup
# Conflicts: # .env.example # solution/backend/common/enums.py # solution/backend/requirements.txt # solution/backend/services/site_payload.py # solution/backend/services/snapshot.py # solution/backend/services/weather_notes.json # solution/shared/src/types/site-payload.ts # solution/site/src/layouts/editorial/Shell.tsx # solution/site/src/lib/use-live-weather.ts # solution/site/src/pages/HomePage.tsx # solution/site/src/sections/SiteFooter.tsx # solution/site/src/sections/WeatherSection.tsx # solution/site/src/sections/index.ts
This commit is contained in:
commit
b78486b845
74 files changed
+3266
-193
No files matched your search
@@ -25,6 +25,8 @@ import router.v1.site.booking_request
|
||||
import router.v1.site.post
|
||||
import router.v1.site.review
|
||||
import router.v1.local.local
|
||||
import router.v1.social.social
|
||||
import router.v1.social.oauth
|
||||
|
||||
API_SERVER_START_TIME = GTime.UTCStr()
|
||||
|
||||
@@ -75,6 +77,10 @@ app.add_middleware(GZipMiddleware, minimum_size=1000)
|
||||
async def log_time(request: Request, call_next):
|
||||
start_time = time.time()
|
||||
response = await call_next(request)
|
||||
if request.url.path.startswith('/v1/social/'):
|
||||
response.headers['Cache-Control'] = 'no-store'
|
||||
response.headers['Referrer-Policy'] = 'no-referrer'
|
||||
response.headers['X-Robots-Tag'] = 'noindex, nofollow'
|
||||
elapsed = time.time() - start_time
|
||||
# status_code 를 함께 남긴다(403/4xx 등을 로그만으로 식별 가능하게).
|
||||
LOG.d(f"{response.status_code} {request.method} {request.url.path} - {elapsed:.4f}s")
|
||||
@@ -129,3 +135,6 @@ app.include_router(router.v1.site.post.owner_router)
|
||||
app.include_router(router.v1.site.review.router)
|
||||
app.include_router(router.v1.local.local.router)
|
||||
app.include_router(router.v1.local.local.weather_router)
|
||||
|
||||
app.include_router(router.v1.social.social.router)
|
||||
app.include_router(router.v1.social.oauth.router)
|
||||
Reference in new issue
Block a user