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

Funktion key from config gets overwritten by function key in url #382

Closed
Derich367 opened this issue Mar 3, 2022 · 0 comments · Fixed by #383
Closed

Funktion key from config gets overwritten by function key in url #382

Derich367 opened this issue Mar 3, 2022 · 0 comments · Fixed by #383
Labels
bug Something isn't working v1.3.0

Comments

@Derich367
Copy link
Contributor

Derich367 commented Mar 3, 2022

Describe the issue
When requesting swagger ui with query parameter "code", the configured function key from parameter "OpenApi__ApiKey" is not used to request open api file. Instead the code from url is used.

In production environment, you normally use function specific keys, so you will need a diferrent key to access swagger ui and request swagger.json. But when requesting swagger ui with a key inside of the query, the same key is used for requesting swagger.json and not the configured key from function parameters.

To Reproduce
Define parameters in local.settings.json:
{ "OpenApi__ApiKey": "functionKey", "OpenApi__AuthLevel__Document":"Function", "OpenApi__AuthLevel__UI":"Function" }

Request Swagger Ui with http://localhost:7071/api/swagger/ui#/?code=otherFunctionKey

The url for swagger.josn is now http://localhost:7071/api/swagger.json?code=otherFunctionKey

Expected behavior
The url for swagger.json should be http://localhost:7071/api/swagger.json?code=functionKey

Environment (please complete the following information, if applicable):

  • OS: Windows
  • Browser: chrome
  • Version: 98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.3.0
Projects
None yet
2 participants