Please forward me some links/how-to guides for developing your own App service site extension for Azure. I am trying to intercept HTTP traffic going to/coming out from my App service and do some pre-checks / alter a few things as a part of the extension.
I didn't find any documents on developing your custom extension for Microsoft Azure App Service.
Can this extension be implemented in Golang? If yes, please share examples too.
In order to add the custom extension that intercepts the Http Requests in your application, You need to create one custom Nuget package built with your extension and publish it as a package in
nuget.org.I created one
Asp.NETMVC application:-Added one class that intercepts traffic:-
TrafficInterceptorMiddleware.cs:-Called this package in my
Program.cs:-Now, I built this project and added the .dll path in the .nuspec file.
Create one
.nuspec filewith the contents below:-Traffic.nuspecIn order for your package to be added in Azure Site Extension add this line of code in your
.nuspec:-Complete code:-
Now, Add run the command below in your nuget CLI:-
You can add
nuget.exein your current project and run the command from the Visual Studio Command Line tool too:-Output:-
I directly uploaded the package by logging into my Nuget account by referring this MS Document:-
After uploading your package will get validated > published > indexed > publicly available:-
After your package is published, Visit your Azure extensions page and the Package is visible for installation:-
In Advanced Tools Kudu > Site Extensions>
Reference:-
Site Extensions are moving to nuget.org by August 2018 · Issue #87 · Azure/app-service-announcements (github.com)