fix:添加favicon,自动添加http

This commit is contained in:
Naccl
2021-03-26 22:05:19 +08:00
parent 8b709b8f83
commit 474f83a517
3 changed files with 4 additions and 0 deletions
@@ -38,6 +38,9 @@ public class IndexController {
@ResponseBody
public R generateShortURL(@RequestParam String longURL) {
if (UrlUtils.checkURL(longURL)) {
if (!longURL.startsWith("http")) {
longURL = "http://" + longURL;
}
String shortURL = urlService.saveUrlMap(HashUtils.hashToBase62(longURL), longURL, longURL);
return R.ok("请求成功", host + shortURL);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

+1
View File
@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>短链接生成</title>
<link rel="icon" href="/img/favicon.ico">
<link rel="stylesheet" href="/css/base.css">
</head>
<body>