Skip to content

Commit

Permalink
Added support for Forwarded and x-forwarded-* headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
GinoCanessa committed Sep 3, 2024
1 parent 6ec8887 commit 18588bb
Show file tree
Hide file tree
Showing 23 changed files with 450 additions and 190 deletions.
45 changes: 25 additions & 20 deletions src/FhirCandle.Ui.Common/FhirCandle.Ui.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\fhir-candle.props" />
<Import Project="..\..\fhir-candle.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="BlazorMonaco" Version="3.2.0" IncludeAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="Models\" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="BlazorMonaco" Version="3.2.0" IncludeAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="Models\" />
</ItemGroup>
</Project>
58 changes: 31 additions & 27 deletions src/FhirCandle.Ui.R4/FhirCandle.Ui.R4.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\fhir-candle.props" />
<Import Project="..\..\fhir-candle.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R4\FhirCandle.R4.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R4\FhirCandle.R4.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/FhirCandle.Ui.R4/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Components.Routing;
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Http;
@using Microsoft.JSInterop;
@using FhirCandle.Ui;
@using FhirCandle.Models;
Expand Down
2 changes: 2 additions & 0 deletions src/FhirCandle.Ui.R4/davinci-cdex/TaskTable.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@using Microsoft.FluentUI.AspNetCore.Components;
@using Hl7.Fhir.Utility;

@inject IHttpContextAccessor HttpContextAccessor

@implements IDisposable

<FluentDataGrid Items="@FilteredItems" GridTemplateColumns="0.75fr 0.5fr 1fr 2fr">
Expand Down
11 changes: 6 additions & 5 deletions src/FhirCandle.Ui.R4/davinci-pas/PasWalkthroughR4.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@using System.Diagnostics.CodeAnalysis;

@inject IJSRuntime JS
@inject IHttpContextAccessor HttpContextAccessor

@*
<MudTimeline TimelineOrientation="TimelineOrientation.Vertical" TimelinePosition="TimelinePosition.Start">
Expand Down Expand Up @@ -789,7 +790,7 @@
{
List<ResourceInfo> patients = new();

if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", "Patient"), out FhirResponseContext opResponse) &&
if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", "Patient", HttpContextAccessor.HttpContext?.Request.Host.ToString()), out FhirResponseContext opResponse) &&
(opResponse.Resource != null) &&
(opResponse.Resource is Hl7.Fhir.Model.Bundle patientBundle))
{
Expand Down Expand Up @@ -828,7 +829,7 @@
List<ResourceInfo> coverages = new();
string query;

if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", $"Encounter?patient={_patient.Id}"), out FhirResponseContext opResponse) &&
if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", $"Encounter?patient={_patient.Id}", HttpContextAccessor.HttpContext?.Request.Host.ToString()), out FhirResponseContext opResponse) &&
(opResponse.Resource != null) &&
(opResponse.Resource is Hl7.Fhir.Model.Bundle encounterBundle))
{
Expand All @@ -847,7 +848,7 @@
}
}

if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", $"Coverage?patient={_patient.Id}"), out opResponse) &&
if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", $"Coverage?patient={_patient.Id}", HttpContextAccessor.HttpContext?.Request.Host.ToString()), out opResponse) &&
(opResponse.Resource != null) &&
(opResponse.Resource is Hl7.Fhir.Model.Bundle coverageBundle))
{
Expand All @@ -868,7 +869,7 @@

query = $"?patient={_patient.Id}&_type={string.Join(',', _allowedPatientRequestTypes)}";

if (ProviderStore.SystemSearch(new FhirRequestContext(ProviderStore, "GET", query), out opResponse) &&
if (ProviderStore.SystemSearch(new FhirRequestContext(ProviderStore, "GET", query, HttpContextAccessor.HttpContext?.Request.Host.ToString()), out opResponse) &&
(opResponse.Resource != null) &&
(opResponse.Resource is Hl7.Fhir.Model.Bundle patientBundle))
{
Expand All @@ -887,7 +888,7 @@
}
}

if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", "Organization"), out opResponse) &&
if (ProviderStore.TypeSearch(new FhirRequestContext(ProviderStore, "GET", "Organization", HttpContextAccessor.HttpContext?.Request.Host.ToString()), out opResponse) &&
(opResponse.Resource != null) &&
(opResponse.Resource is Hl7.Fhir.Model.Bundle relatedBundle))
{
Expand Down
58 changes: 31 additions & 27 deletions src/FhirCandle.Ui.R4B/FhirCandle.Ui.R4B.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\fhir-candle.props" />
<Import Project="..\..\fhir-candle.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R4B\FhirCandle.R4B.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R4B\FhirCandle.R4B.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/FhirCandle.Ui.R4B/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Components.Routing;
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Http;
@using Microsoft.JSInterop;
@using FhirCandle.Ui;
@using FhirCandle.Models;
Expand Down
58 changes: 31 additions & 27 deletions src/FhirCandle.Ui.R5/FhirCandle.Ui.R5.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\fhir-candle.props" />
<Import Project="..\..\fhir-candle.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R5\FhirCandle.R5.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<Compile Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
<EmbeddedResource Remove="wwwroot\**" />
<None Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Emoji" Version="4.6.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.9.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FhirCandle.Ui.Common\FhirCandle.Ui.Common.csproj" />
<ProjectReference Include="..\FhirStore.Common\FhirCandle.Common.csproj" />
<ProjectReference Include="..\FhirStore.R5\FhirCandle.R5.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Components\Pickers\" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/FhirCandle.Ui.R5/_Imports.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Components.Routing;
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Http;
@using Microsoft.JSInterop;
@using FhirCandle.Ui;
@using FhirCandle.Models;
Expand Down
Loading

0 comments on commit 18588bb

Please sign in to comment.