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

Fix issue with default route prefix #8

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Conversation

MGudgin
Copy link
Contributor

@MGudgin MGudgin commented Mar 6, 2020

If the Azure Functions app used the default route prefix of api, but
that route prefix was NOT specified in host.json, the GetHostRoutePrefix
method would return null. This would break local debugging as the
ExecuteFunction implementation would try to invoke the wrong URI for
the target function. For example, it would try to invoke /Test rather
than /api/Test.

This PR fixes this issue by having GetHostRoutePrefix return 'api' in
the case where no route prefix is specified in host.json.

This change has been tested with four cases;

  1. Default route prefix, no prefix specified in host.json.
  2. Default route prefix, prefix specified in host.json.
  3. Custom, non-empty route prefix, prefix specified in host.json.
  4. Custom, empty route prefix, prefix specified in host.json.

Also update readme.md to call out that custom route prefixes require
changes to playfab.local.settings.json.

If the Azure Functions app used the default route prefix of api, but
that route prefix was NOT specified in host.json, the GetHostRoutePrefix
method would return null. This would break local debugging as the
ExecuteFunction implementation would try to invoke the wrong URI for
the target function. For example, it would try to invoke /Test rather
than /api/Test.

This PR fixes this issue by having GetHostRoutePrefix return 'api' in
the case where no route prefix is specified in host.json.

This change has been tested with four cases;

1. Default route prefix, no prefix specified in host.json.
2. Default route prefix, prefix specified in host.json.
3. Custom, non-empty route prefix, prefix specified in host.json.
4. Custom, empty route prefix, prefix specified in host.json.

Also update readme.md to call out that custom route prefixes require
changes to playfab.local.settings.json.
@MGudgin MGudgin force-pushed the gudge/fix_host_route branch from f4cfe53 to 739fbec Compare March 7, 2020 00:20
@MGudgin MGudgin merged commit 42e8e14 into master Mar 9, 2020
@MGudgin MGudgin deleted the gudge/fix_host_route branch March 9, 2020 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant