Commit 7d5ebcf
calderbuild
fix(analytics): read BAIDU_TONGJI_ID per-request instead of at import time
The Jinja2 global was set once at module import time via
templates.env.globals, which captured an empty string if the
env var wasn't available during import. Changed to pass
baidu_tongji_id through template context at request time,
matching how the /api/config/analytics endpoint works.1 parent 7becc5b commit 7d5ebcf
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| 153 | + | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
| |||
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
| 187 | + | |
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
| |||
245 | 252 | | |
246 | 253 | | |
247 | 254 | | |
| 255 | + | |
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
| |||
331 | 339 | | |
332 | 340 | | |
333 | 341 | | |
| 342 | + | |
334 | 343 | | |
335 | 344 | | |
336 | 345 | | |
| |||
0 commit comments