I have the followings TWO independent projects deployed at Azure from GitHub:
- an Angular UI project as Static Web App (SWA)
- an Node API project as Azure Function (AF)
AF can talk to local-run UI and Postman no problem.
When UI is deployed to Azure and talk to the same AF, it gets 405
. To troubleshoot, I did
- Query AF logs:
FunctionAppLogs | where Level contains "error"
returns zero record.FunctionAppLogs | order by TimeGenerated desc | limit 100
returns allInformation
forLevel
. - Thinking to get SWA's IP to AF's firewall rule, but it doesn't have
networking
tab for an IP. - When trying to enable
Application Insights
for SWA log, it saysSWA
must have at least one function
I followed this to deploy my Angular SWA. Only difference is his API AF are integrated into the project, mine is a independent project outside of the Angular.
Update, this is how I setup the SWA:
- Add a Static Web App
- Choose GitHub for publish source, and log in
- Choose repository and branch
- Complete a new Pull and Merge, project is auto-build and deployed