You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API requests to the Django backend should be logged. (The default Django log also shows the endpoints, but it's not enough.) This task has some overlapping parts with #2065
The source of the requests would be also good to know: is it a ...
frontend request (the most of the requests)
ad-hoc human or human-driven requests out of GO frontend (Postman, curl...)
other (like Googlebot or other bot or scraper)
The frontend should send the requests with something like headers: {'X-Request-Source': 'frontend-app' }, this would make backend's life easier. (At least easier than gathering "Frontend IP-Addresses".)
the Googlebot and other bots give their name on the requests
all the others are the ad-hoc requests.
Let's make an opportunity to have an overview on these.
The text was updated successfully, but these errors were encountered:
After the front-end change this code could be implemented:
def my_view(request):
if request.method == 'POST' and 'source' in request.data and request.data['source'] == 'frontend-app':
source = "Frontend"
elif "Googlebot" in something or "bot" in something:
source = "Bot"
else:
source = "Ad-hoc"
# Log the request details along with the source
logger.info(f"Request from {request.META['REMOTE_ADDR']} (source: {source})")
The API requests to the Django backend should be logged. (The default Django log also shows the endpoints, but it's not enough.) This task has some overlapping parts with #2065
The source of the requests would be also good to know: is it a ...
The frontend should send the requests with something like headers: {'X-Request-Source': 'frontend-app' }, this would make backend's life easier. (At least easier than gathering "Frontend IP-Addresses".)
Let's make an opportunity to have an overview on these.
The text was updated successfully, but these errors were encountered: