Skip to content

Commit d70badb

Browse files
committed
Minor updates
1 parent 6784ac5 commit d70badb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ You can of course also deploy the [ARM template](azuredeploy-webapp.json) manual
9292

9393
## Authentication
9494

95-
By default, the web app is publicly accessible after deployment, which also means the document content is freely searchable. This isn't a problem for the documents that are included by default (which are public anyway), but if you're uploading your own documents you probably want to add authentication to the web app. This can easily be done by setting up the built-in [authentication and authorization feature on App Service](https://learn.microsoft.com/azure/app-service/overview-authentication-authorization), which can make the web app accessible only by users from your own organization for example.
95+
By default, the web app is publicly accessible after deployment, which also means the document content is freely searchable. This isn't a problem for the documents that are included by default (which are public anyway), but if you're uploading your own documents you probably want to add authentication to the web app.
96+
97+
This can easily be done by setting up the built-in [authentication and authorization feature on App Service](https://learn.microsoft.com/azure/app-service/overview-authentication-authorization), which can make the web app accessible only by users from your own organization for example. If you're using Microsoft Entra ID (formerly Azure AD) as the identity provider, then you can also easily [restrict your application to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users), by configuring user assignment to be required.
9698

9799
## Configuration
98100

src/Azure.AISearch.WebApp/Azure.AISearch.WebApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.6" />
11+
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.7" />
1212
<PackageReference Include="Azure.Search.Documents" Version="11.5.0-beta.4" />
1313
<PackageReference Include="Azure.Storage.Blobs" Version="12.17.0" />
1414
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.20" />

src/Azure.AISearch.WebApp/Pages/Shared/_SearchResponse.cshtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
@if (Model != null)
44
{
5+
@if (string.IsNullOrWhiteSpace(Model.Error) && !Model.Answers.Any() && !Model.Captions.Any() && !Model.SearchResults.Any())
6+
{
7+
<div class="mt-3 alert alert-info">Sorry, there are no results for your search query!</div>
8+
}
9+
510
@if (!string.IsNullOrWhiteSpace(Model.Error))
611
{
712
<div class="alert alert-danger mt-3">@Model.Error</div>
813
}
914

1015
<div class="search-results">
11-
@if (!Model.Answers.Any() && !Model.Captions.Any() && !Model.SearchResults.Any())
12-
{
13-
<div class="mt-3 alert alert-info">Sorry, there are no results for your search query!</div>
14-
}
15-
1616
@if (Model.Answers.Any())
1717
{
1818
<h4 class="mt-3">@Model.Answers.ToCountString("answer")</h4>

0 commit comments

Comments
 (0)