diff --git a/tests/test_static_cache.py b/tests/test_static_cache.py index 8c01ce5..c0bfae1 100644 --- a/tests/test_static_cache.py +++ b/tests/test_static_cache.py @@ -10,6 +10,7 @@ """ import pathlib +import re import pytest from fastapi.testclient import TestClient @@ -58,3 +59,24 @@ def test_api_responses_are_left_alone(client): assert response.status_code == 200 assert response.headers.get("cache-control") is None + + +def test_the_shell_pulls_nothing_from_the_internet(): + """外壳(index.html)里不能出现任何指向外网的 link/script。 + + 真踩过:`
` 里挂了一个 fonts.googleapis.com 的阻塞样式表,而这套东西是 + **内网部署**,那台机器连不上 Google。样式表拿不到,它后面的 + `