mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-18 20:39:36 +02:00
14 lines
384 B
Python
14 lines
384 B
Python
|
class AppVersionMiddleware:
|
||
|
def __init__(self, get_response):
|
||
|
self.get_response = get_response
|
||
|
|
||
|
def __call__(self, request):
|
||
|
# Process request (if needed)
|
||
|
response = self.get_response(request)
|
||
|
|
||
|
# Add custom header to response
|
||
|
# Replace with your app version
|
||
|
response['X-AdventureLog-Version'] = '1.0.0'
|
||
|
|
||
|
return response
|