Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routePrefix cannot be overridden by AzureFunctionsJobHost__extensions__http__routePrefix environment variable #3009

Open
MatthewFisher-eaton opened this issue Mar 26, 2025 · 1 comment
Assignees
Labels
Needs: Triage (Functions) potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug

Comments

@MatthewFisher-eaton
Copy link

Description

routePrefix is currently read directly from the host.json file with no provision to override from an environment variable.

See FunctionsEndpointDataSource.BuildEndpoints.

The host allows the override via AzureFunctionsJobHost__extensions__http__routePrefix, but then the call to the worker fails with a timeout because the routePrefix does not match.

Steps to reproduce

Minimal repro attached as RoutePrefixOverride.zip

  • Create a dotnet-isolated function called Version with a route prefix of api/foo in host.json.
  • Verify api/foo/version responds as expected.
  • Add the following in local.settings.json:
     "AzureFunctionsJobHost__extensions__http__routePrefix": "api/bar"
  • Restart the function.
  • Confirm the original api/foo/version now returns a 404.
  • Confirm the new api/bar/version returns a 500.

Image

@MatthewFisher-eaton MatthewFisher-eaton added the potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug label Mar 26, 2025
@MatthewFisher-eaton
Copy link
Author

This was discovered while migrating a Function from in-process to an isolated-worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage (Functions) potential-bug Items opened using the bug report template, not yet triaged and confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants