Skip to content

Conversation

@MWG-Logan
Copy link
Owner

This pull request introduces configuration for static web app authentication and routing in the project. The main changes are the addition of a staticwebapp.config.json file to define custom routes, authentication rules, and response overrides, and ensuring this configuration is copied to the output directory during builds.

Static web app configuration:

  • Added staticwebapp.config.json to wwwroot with routes restricting /api/* to authenticated users, a custom login route, and a 401 response override to redirect unauthenticated users to GitHub login.

Build process update:

  • Updated Bezalu.ProjectReporting.Web.csproj to copy staticwebapp.config.json to the output directory on build, ensuring deployment includes the correct configuration.

Copilot AI review requested due to automatic review settings December 23, 2025 20:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Static Web App authentication configuration to protect API endpoints and handle unauthenticated access. However, the implementation contains several critical issues that will prevent the configuration from working correctly.

  • Addition of staticwebapp.config.json to configure authentication and routing rules for Azure Static Web Apps
  • Update to the project file to copy the configuration file during build
  • Configuration of routes to restrict API access and handle 401 responses

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
Bezalu.ProjectReporting.Web/staticwebapp.config.json Adds Static Web App configuration with authentication rules, but contains critical JSON syntax errors and authentication provider inconsistencies
Bezalu.ProjectReporting.Web/Bezalu.ProjectReporting.Web.csproj Configures build to copy staticwebapp.config.json, but references incorrect file path (wwwroot instead of project root)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Dec 23, 2025

@MWG-Logan I've opened a new pull request, #25, to work on those changes. Once the pull request is ready, I'll request review from you.

@MWG-Logan MWG-Logan merged commit fa5fc30 into dev Dec 23, 2025
3 of 4 checks passed
@MWG-Logan MWG-Logan deleted the swa-auth branch December 23, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants