File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 <base href =" /" />
88 <ResourcePreloader />
99 <link rel =" stylesheet" href =" @Assets[" app.css " ]" />
10- <link rel =" stylesheet" href =" @Assets[" GitProtect.styles.css " ]" />
1110 <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
1211 <ImportMap />
1312 <link rel =" icon" type =" image/png" href =" favicon.png" />
Original file line number Diff line number Diff line change 66using GitProtect . Services ;
77using Microsoft . EntityFrameworkCore ;
88
9- var builder = WebApplication . CreateBuilder ( args ) ;
9+ var builder = WebApplication . CreateBuilder ( new WebApplicationOptions
10+ {
11+ Args = args ,
12+ ContentRootPath = AppContext . BaseDirectory
13+ } ) ;
14+ builder . WebHost . UseWebRoot ( Path . Combine ( AppContext . BaseDirectory , "wwwroot" ) ) ;
1015
1116// Allow Docker-prefixed env vars (GITPROTECT__*) to override appsettings.
1217builder . Configuration . AddEnvironmentVariables ( "GITPROTECT__" ) ;
3843
3944var app = builder . Build ( ) ;
4045
41- app . Use ( ( context , next ) =>
42- {
43- var path = context . Request . Path . Value ;
44- if ( ! string . IsNullOrEmpty ( path )
45- && ( path . StartsWith ( "http://" , StringComparison . OrdinalIgnoreCase )
46- || path . StartsWith ( "https://" , StringComparison . OrdinalIgnoreCase ) ) )
47- {
48- if ( Uri . TryCreate ( path , UriKind . Absolute , out var uri ) )
49- {
50- context . Request . Path = uri . AbsolutePath ;
51- context . Request . QueryString = string . IsNullOrEmpty ( uri . Query )
52- ? QueryString . Empty
53- : new QueryString ( uri . Query ) ;
54- }
55- }
56-
57- return next ( ) ;
58- } ) ;
59-
6046if ( app . Environment . IsDevelopment ( ) )
6147{
6248 app . UseWebAssemblyDebugging ( ) ;
Original file line number Diff line number Diff line change @@ -40,4 +40,4 @@ chown -R "${PUID}:${PGID}" /app /data
4040chmod 755 /app
4141chmod 775 /data
4242
43- exec su -s /bin/sh -c " cd /app && dotnet GitProtect.dll" " ${APP_USER} "
43+ exec su -s /bin/sh -c " dotnet /app/ GitProtect.dll" " ${APP_USER} "
You can’t perform that action at this time.
0 commit comments