Azure / Azure/static-web-apps

Protect the static site only to Azure Active Directory accounts

Open
#646 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Thanks for this project. Based on the documentation it was quite straightforward to [publish an DocFx Project](https://github.com/Azure/static-web-apps/issues/367#issuecomment-978963907).

Now i have to protect the site only to specific users from our Azure Active Directory. I have implemented a solution, based on [this article](https://dev.to/bazenteklehaymanot/serving-docfx-from-net-to-add-authentication-2pak). It workes locally, but when I publish it to Azure Static Webapps I see:

> Failed to find a default file in the app artifacts folder (docs/ServeDocFx/bin/Release/net6.0). Valid default files: index.html,Index.html.

This seems to be clear, because I try to serve an .NET 6 application, which is a dll and not static.

So, I am unsure, if it can be achieved to secure the HTML pages by configuration [as described here](https://docs.microsoft.com/de-de/azure/static-web-apps/authentication-authorization?tabs=invitations). I cannot change the static files. They are, as they are. Just a set of HTML files.

Has anybody achieved to secure the access, without changing the content of the HTML files? Any tip appreciated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.