Azure / Azure/static-web-apps

Next.JS build time data binding via API call with a key

Open
#1,126 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am utilising the feature of being able to pull data and bind them while the app is being built in Azure DevOps CI pipeline. The backend API URL (Azure APIM) is located in Azure DevOps Library where the value is taken and set as follows:

```yml
- task: AzureStaticWebApp@0
displayName: 'Build & Deploy Code'
inputs:
app_location: 'src' # the app is located
output_location: "out"
azure_static_web_apps_api_token: $(apiKey)
APP_BUILD_COMMAND: CompURL='$(CompURL)' yarn build
```

This URL is publicly accessible and I want to be able to secure this URL.
Let's assume I would set a Key or Token for this endpoint and I want to associate it with the URL over here.
How can I set the key/token value for this particular URL to be executed in build time?
Secondly, when a key/token value is passed, I believe this value will be revealed while the build pipeline is executing( output panel)
Can we mask it?

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.