Skip to content

Instantly share code, notes, and snippets.

@SehgalDivij
SehgalDivij / middleware.py
Last active July 4, 2024 15:49
Middleware in django to log all requests and responses(Inspired by another Github gist I cannot find the link to, now)
"""
Middleware to log all requests and responses.
Uses a logger configured by the name of django.request
to log all requests and responses according to configuration
specified for django.request.
"""
# import json
import logging
from django.utils.deprecation import MiddlewareMixin
@mehmetsefabalik
mehmetsefabalik / nginx-https-local.md
Last active July 10, 2024 08:59
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install