This commit is contained in:
Zeeshaun
2026-03-25 15:19:29 +00:00
parent 1f0d78cb6b
commit c67cbefcf4
3 changed files with 11 additions and 5 deletions
@@ -5,6 +5,7 @@ WORKDIR /app
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm install -g npm@9 RUN npm install -g npm@9
RUN npm pkg delete dependencies.node
ARG PAT=vvqu3q252m5kqwptu4tavha4ghk4svhmwsahb2kvlu22ogiegt6q ARG PAT=vvqu3q252m5kqwptu4tavha4ghk4svhmwsahb2kvlu22ogiegt6q
RUN TOKEN="$(printf "%s" "${PAT}" | base64 | tr -d '\n')" && \ RUN TOKEN="$(printf "%s" "${PAT}" | base64 | tr -d '\n')" && \
@@ -17,7 +18,7 @@ RUN TOKEN="$(printf "%s" "${PAT}" | base64 | tr -d '\n')" && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:_password=%s\n" "${TOKEN}" >> .npmrc && \ printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:_password=%s\n" "${TOKEN}" >> .npmrc && \
printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:[email protected]\n" >> .npmrc printf "//landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/npm/:[email protected]\n" >> .npmrc
RUN npm ci --unsafe-perm RUN npm install --unsafe-perm
COPY . ./ COPY . ./
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Identity.Web; using Microsoft.Identity.Web;
using Microsoft.Identity.Web.UI; using Microsoft.Identity.Web.UI;
using Microsoft.AspNetCore.HttpOverrides;
using Blazored.Toast; using Blazored.Toast;
using LCU.Library.Internal.Configuration; using LCU.Library.Internal.Configuration;
using LCU.Library.Internal.LcuHttpClient; using LCU.Library.Internal.LcuHttpClient;
@@ -32,8 +33,8 @@ namespace ReserveManagementSystemUI
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
services.AddAzureAdGroupPolicyServicesWithToken(Configuration.GetSection("AzureAd"), services.AddAzureAdGroupPolicyServices(Configuration.GetSection("AzureAd"),
Configuration.GetSection("Security")); Configuration.GetSection("Security"));
var appConfiguration = new AppConfiguration(); var appConfiguration = new AppConfiguration();
Configuration.GetSection("Primary").Bind(appConfiguration); Configuration.GetSection("Primary").Bind(appConfiguration);
@@ -92,6 +93,10 @@ namespace ReserveManagementSystemUI
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseStaticFiles(); app.UseStaticFiles();
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedProto
});
app.UseRouting(); app.UseRouting();
app.UseAuthentication(); app.UseAuthentication();
@@ -100,7 +105,6 @@ namespace ReserveManagementSystemUI
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {
endpoints.MapControllers(); endpoints.MapControllers();
endpoints.MapRazorPages();
endpoints.MapBlazorHub(); endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host"); endpoints.MapFallbackToPage("/_Host");
}); });
@@ -5,7 +5,8 @@
"TenantId": "00000000-0000-0000-0000-000000000000", "TenantId": "00000000-0000-0000-0000-000000000000",
"ClientId": "00000000-0000-0000-0000-000000000000", "ClientId": "00000000-0000-0000-0000-000000000000",
"CallbackPath": "/signin-oidc", "CallbackPath": "/signin-oidc",
"ClientSecret": "VALUE-IN-KEYVAULT" "ClientSecret": "VALUE-IN-KEYVAULT",
"AuthenticationUrl": "https://login.microsoftonline.com/landmarkcu.onmicrosoft.com/oauth2/v2.0/token"
}, },
"Primary": { "Primary": {
"AppName": "Reserve Management System", "AppName": "Reserve Management System",