I have this VAPT comment to be resolved.
I need to disable trace option from APIs.
http methods:
| Supported Methods: OPTIONS TRACE GET HEAD POST
|_ Potentially risky methods: TRACE
Tried to disable from appSettings.json
changing the log level information like this:
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft.AspNetCore.Hosting.Internal.WebHost": "None",
"Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker": "None",
}
}
2
Answers
Added below code in startup file of .NET core, it solved the issue
If you are using Azure web apps and IIS to host your asp.net core web API application, I suggest you could modify the published web.config as below:
Then when you send the trace method, it will not return any value to the client.