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

[#175496403] Removed authentication and standard endpoint for health check #100

Merged
merged 2 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Info/function.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"bindings": [
{
"authLevel": "function",
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"route": "adm/info",
"route": "info",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this or is just a matter of style?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need this as when the API is reachable through the API gateway we need a prefix to discriminate the target functions (backend)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a good practice have the same standard API for all our health checks.
We need to expose info API on api management? I don't see any other info API configured on api management.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have the need to avoid a conflict on the /info path (read: if we don't want to expose the API though an API managament) then you can strip down the prefix

"methods": [
"get"
]
Expand Down
2 changes: 1 addition & 1 deletion Info/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const app = express();
secureExpressApp(app);

// Add express route
app.get("/adm/info", Info());
app.get("/info", Info());

const azureFunctionHandler = createAzureFunctionHandler(app);

Expand Down