We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96f6900 commit 1d2c19bCopy full SHA for 1d2c19b
server.py
@@ -159,6 +159,12 @@ def text_file_response(filename):
159
'Content-Disposition': 'inline'
160
})
161
162
+def css_file_response(filename):
163
+ with open(filename) as f:
164
+ return web.Response(body=f.read().encode(), headers={
165
+ 'Content-Type': 'text/css',
166
+ 'Content-Disposition': 'inline'
167
+ })
168
169
def html_response(filename):
170
with open(filename) as f:
@@ -226,6 +232,8 @@ async def handle(request):
226
232
if not filetype:
227
233
filetype = filetype_fallback(filename)
228
234
if 'text' in filetype:
235
+ if filename.endswith('.css'):
236
+ return css_file_response(filename)
229
237
return text_file_response(filename)
230
238
else:
231
239
return await binary_file_response(filename, filetype, request)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments