Bugfix/base url in docker (#1901)

* fixed: BaseUrl option is not supported in Docker

- discussion in #1824, the checks should not have been added in the first place

* changed: contributors require .NET 7.0+ in order to build
This commit is contained in:
Andy 2023-04-14 14:48:44 -04:00 committed by GitHub
parent f80382ecef
commit c8a16a4370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 10 deletions

View File

@ -391,7 +391,6 @@ public class Startup
{ {
try try
{ {
if (new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker) return;
var htmlDoc = new HtmlDocument(); var htmlDoc = new HtmlDocument();
var indexHtmlPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"); var indexHtmlPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html");
htmlDoc.Load(indexHtmlPath); htmlDoc.Load(indexHtmlPath);

View File

@ -13,7 +13,7 @@ Setup guides, FAQ, the more information we have on the [wiki](https://wiki.kavit
- HTML/Javascript editor of choice (VS Code/Sublime Text/Webstorm/Atom/etc) - HTML/Javascript editor of choice (VS Code/Sublime Text/Webstorm/Atom/etc)
- [Git](https://git-scm.com/downloads) - [Git](https://git-scm.com/downloads)
- [NodeJS](https://nodejs.org/en/download/) (Node 16.X.X or higher) - [NodeJS](https://nodejs.org/en/download/) (Node 16.X.X or higher)
- .NET 6.0+ - .NET 7.0+
- dotnet tool install -g --version 6.4.0 Swashbuckle.AspNetCore.Cli - dotnet tool install -g --version 6.4.0 Swashbuckle.AspNetCore.Cli
### Getting started ### ### Getting started ###

View File

@ -213,10 +213,6 @@ public static class Configuration
#region BaseUrl #region BaseUrl
private static string GetBaseUrl(string filePath) private static string GetBaseUrl(string filePath)
{ {
if (new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker)
{
return DefaultBaseUrl;
}
try try
{ {
@ -252,10 +248,6 @@ public static class Configuration
private static void SetBaseUrl(string filePath, string value) private static void SetBaseUrl(string filePath, string value)
{ {
if (new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker)
{
return;
}
var baseUrl = !value.StartsWith("/") var baseUrl = !value.StartsWith("/")
? $"/{value}" ? $"/{value}"