(url)
| 195 | } |
| 196 | |
| 197 | function safeUrlDisplay(url) { |
| 198 | const parsed = new URL(url) |
| 199 | if (parsed.password) { |
| 200 | parsed.password = '***' |
| 201 | } |
| 202 | if (parsed.username) { |
| 203 | parsed.username = parsed.username.slice(0, 4) + '***' |
| 204 | } |
| 205 | return parsed.toString() |
| 206 | } |
| 207 | |
| 208 | // Return '20220719012012' if the current date is |
| 209 | // 2022-07-19T01:20:12.172Z. Note how the 6th month (July) becomes |