Skip to content

POST to loggers actuator fails if the base management path is / #467

@jpenniman

Description

@jpenniman

Describe the bug

When posting to the loggers endpoint when using the dynamic logger to change the log level, the request fails with a 400 bad request if the management endpoints path is /.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a simple AspNet Core app and add Steeltoe Dynamic logging and Management Endpoints.
  2. Configure the management endpoints:
  "Management": {
    "Endpoints": {
      "Path": "/",
      "Actuator": {
        "Exposure": {
          "Include": [ "info", "health", "loggers" ]
        }
      }
    }
  }
  1. Attempt to change the level: POST https://localhost:5000/loggers/Microsoft

Expected behavior

The request to return a 200 OK and the level should be changed.

Environment (please complete the following information):

  • Platform: Local
  • OS: Windows 10
  • .NET Version: Core 3.1
  • Steeltoe Version 3.0 (also fails in 2.x line)

Metadata

Metadata

Assignees

Labels

Component/ManagementIssues related to Steeltoe Management (actuators)ReleaseLine/2.xIdentified as a feature/fix for the 2.x release lineReleaseLine/3.xIdentified as a feature/fix for the 3.x release lineType/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions