mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 19:28:29 +02:00
Do not escape valid characters in custom CSS (#863)
This commit is contained in:
10
bookmarks/views/custom_css.py
Normal file
10
bookmarks/views/custom_css.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.http import HttpResponse
|
||||
|
||||
custom_css_cache_max_age = 2592000 # 30 days
|
||||
|
||||
|
||||
def custom_css(request):
|
||||
css = request.user_profile.custom_css
|
||||
response = HttpResponse(css, content_type="text/css")
|
||||
response["Cache-Control"] = f"public, max-age={custom_css_cache_max_age}"
|
||||
return response
|
Reference in New Issue
Block a user