Skip to content

Add web.config for Azure App Service IIS deployment#58

Merged
fpittelo merged 4 commits intodevfrom
copilot/fix-issue-56-using-57
Nov 22, 2025
Merged

Add web.config for Azure App Service IIS deployment#58
fpittelo merged 4 commits intodevfrom
copilot/fix-issue-56-using-57

Conversation

Copy link
Contributor

Copilot AI commented Nov 22, 2025

PR #57 deployed React build artifacts to Azure App Service but failed during ZIP deployment. Azure App Service runs IIS, which requires a web.config file to serve SPAs correctly.

Changes

  • Added frontend/app/public/web.config: IIS configuration with URL rewrite rules
    • Rewrites all non-file requests to index.html for client-side routing
    • Excludes /.auth/* paths to preserve Azure App Service authentication endpoints
    • Configures MIME types for .json, .woff, .woff2
    • Uses DetailedLocalOnly error mode to prevent information disclosure

The file is automatically copied to build/ during npm run build and deployed with the application.

<rule name="React Routes" stopProcessing="true">
  <match url=".*" />
  <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_URI}" pattern="^/(\.auth)" negate="true" />
  </conditions>
  <action type="Rewrite" url="/" />
</rule>

Fixes #56

Original prompt

#56 is not solved as #57 failed. Have a look and solve


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 22, 2025 11:19
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Co-authored-by: fpittelo <3135901+fpittelo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unresolved issue 56 based on findings from 57 Add web.config for Azure App Service IIS deployment Nov 22, 2025
Copilot AI requested a review from fpittelo November 22, 2025 11:26
Copy link
Owner

@fpittelo fpittelo left a comment

Choose a reason for hiding this comment

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

ok

@fpittelo fpittelo marked this pull request as ready for review November 22, 2025 11:31
@fpittelo fpittelo merged commit 8937ff8 into dev Nov 22, 2025
@fpittelo fpittelo deleted the copilot/fix-issue-56-using-57 branch November 22, 2025 11:31
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