Skip to content

Commit

Permalink
修复 GetUA 中 ILogger 的 Category 错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lc6464 committed Apr 5, 2024
1 parent 6aa2d35 commit 39e1924
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<Authors>LC</Authors>
<Copyright>Copyright © 2022-2024 LC. All rights reserved.</Copyright>
</PropertyGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\linux-x64.pubxml" />
<_WebToolingArtifacts Remove="Properties\PublishProfiles\win-x64.pubxml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion Controllers/GetUAController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace API.Controllers;
[ApiController]
[Route("[controller]")]
public class GetUAController(ILogger<GetIPController> logger, IHttp304 http304) : ControllerBase {
public class GetUAController(ILogger<GetUAController> logger, IHttp304 http304) : ControllerBase {
[HttpGet]
[ResponseCache(CacheProfileName = "Private1d")] // 客户端缓存1天
public UserAgent? Get() { // 获取 User-Agent
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ LC 的网站的全新的 API!
1. 在[最新的发行版](https://github.com/lc6464/api.lcwebsite.cn/releases/latest)中下载 Windows x64 版本
2. 解压文件
3. 运行 `API.exe` 或用 `dotnet cli` 运行 `API.dll`,也可以部署到 IIS(建议)
4. 在浏览器中访问 [localhost:5000](http://localhost:5000/Hello "localhost:5000")(若要更改端口号通过命令行参数、环境变量等方式更改,IIS 部署则在`绑定`中设定)
4. 在浏览器中访问 [localhost:5000](http://localhost:5000/Hello "localhost:5000/Hello")(若要更改端口号通过命令行参数、环境变量等方式更改,IIS 部署则在`绑定`中设定)
- Linux
1. 在[最新的发行版](https://github.com/lc6464/api.lcwebsite.cn/releases/latest)中下载 Linux x64 版本
2. 解压文件
3. 运行 `API` 或用 `dotnet cli` 运行 `API.dll`
4. 在浏览器中访问 [localhost:5000](http://localhost:5000/Hello "localhost:5000")(若要更改端口号通过命令行参数、环境变量等方式更改)
4. 在浏览器中访问 [localhost:5000](http://localhost:5000/Hello "localhost:5000/Hello")(若要更改端口号通过命令行参数、环境变量等方式更改)
- macOS
1. 参考下方教程自行编译

Expand Down

0 comments on commit 39e1924

Please sign in to comment.