Skip to content

Commit 237c106

Browse files
Merge pull request #6999 from diberry/diberry/0307-url-allowlist-fixes
JS - URL ALLOW LIST - Placeholder fixes
2 parents d120dec + 7250c61 commit 237c106

File tree

3 files changed

+38
-37
lines changed

3 files changed

+38
-37
lines changed

articles/javascript/core/configure-local-development-environment.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Configure your local JavaScript environment for Azure development
33
description: How to set up a local JavaScript dev environment for working with Azure, including an editor, the Azure SDK libraries, optional tools, and the necessary credentials for library authentication.
4-
ms.date: 01/07/2025
4+
ms.date: 03/07/2025
55
ms.topic: how-to
66
ms.custom: devx-track-js, azure-sdk-javascript-ai-text-analytics-5.0.0
77
---
88

99
# Configure your JavaScript develop environment for Azure
1010

11-
When creating cloud applications, developers typically prefer to test code on their local workstations before deploying that code to a cloud environment like Azure. Local development gives you the advantage of a wider variety of tools along with a familiar environment.
11+
When you create cloud applications, developers typically prefer to test code on their local workstations before deploying that code to a cloud environment like Azure. Local development gives you the advantage of a wider variety of tools along with a familiar environment.
1212

1313
This article provides setup instructions to create and validate a local development environment that's suitable for JavaScript with Azure.
1414

@@ -38,24 +38,25 @@ This article provides setup instructions to create and validate a local developm
3838
:::column-end:::
3939
:::column span="2":::
4040
If you already have a subscription, access your existing subscription with:
41-
* [Azure portal](https://portal.azure.com)
42-
* [Azure CLI](/cli/azure/install-azure-cli)
43-
* [Azure client libraries for JavaScript](../azure-sdk-library-package-index.md)
44-
* [Visual Studio Code extensions](https://marketplace.visualstudio.com/search?term=azure&target=VSCode&category=Azure&sortBy=Relevance)
41+
42+
* [Azure portal](https://portal.azure.com)
43+
* [Azure CLI](/cli/azure/install-azure-cli)
44+
* [Azure client libraries for JavaScript](../azure-sdk-library-package-index.md)
45+
* [Visual Studio Code extensions](https://marketplace.visualstudio.com/search?term=azure&target=VSCode&category=Azure&sortBy=Relevance)
4546
:::column-end:::
4647
:::row-end:::
4748
:::row:::
4849
:::column span="1":::
4950
Across multiple subscriptions
5051
:::column-end:::
51-
:::column span="2" :::
52+
:::column span="2":::
5253
If you need to manage multiple subscriptions, [learn how](/azure/governance/management-groups/create-management-group-javascript) to create a management group with JavaScript.
5354
:::column-end:::
5455
:::row-end:::
5556

5657
## One-time software installation
5758

58-
Azure development with JavaScript on your local workstation, we suggest you install the following:
59+
Azure development with JavaScript on your local workstation, we suggest you install the following tools:
5960

6061
|Name/Installer|Description|
6162
|--|--|
@@ -136,7 +137,7 @@ set AZURE_CLIENT_SECRET="<REPLACE-WITH-YOUR-AZURE-CLIENT-SECRET>"
136137

137138
---
138139

139-
Replace the values shown in these commands with those of your specific environment variable.
140+
Replace the values in `<>` brackets in these commands with those of your specific environment variable.
140141

141142
### Create `.env` file
142143

@@ -158,9 +159,9 @@ For every project, we recommend that you always create a separate folder, and it
158159
npm init -y
159160
```
160161

161-
This creates the package.json file and initializes the minimum properties.
162+
This command creates the package.json file and initializes the minimum properties.
162163

163-
1. Install the Azure cl libraries you need, such as this example:
164+
1. Install the Azure client libraries you need, such as this authentication client library example:
164165

165166
```console
166167
npm install @azure/identity
@@ -180,10 +181,10 @@ We recommend that you get into the habit of creating a source control repository
180181

181182
1. Create a new repository on [GitHub](https://github.com/new) and copy the repository URL for the next few step.
182183

183-
1. In the Visual Studio integrated terminal, use the following [git](https://git-scm.com/docs) command to add your remote repository to your local repository. Replace `YOUR-ALIAS` and `YOUR-REPOSITORY` with your own values.
184+
1. In the Visual Studio integrated terminal, use the following [git](https://git-scm.com/docs) command to add your remote repository to your local repository. Replace `<YOUR-ACCOUNT>` and `<REPOSITORY>` with your own values.
184185

185186
```bash
186-
git remote add origin https://github.com/YOUR-ALIAS/YOUR-REPOSITORY
187+
git remote add origin https://github.com/<YOUR-ACCOUNT>/<REPOSITORY>
187188
```
188189

189190
Visual Studio Code includes many built-in git features. For more information, see [Using Version Control in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol).

articles/javascript/how-to/with-visual-studio-code/clone-github-repository.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ This action isn't available from this feature. Select a different tab.
4242
1. Clone your repo with the following git command:
4343

4444
```bash
45-
git clone https://github.com/YOUR-NAME-OR-ORGANIZATION/YOUR-REPO-NAME
45+
git clone https://github.com/<ACCOUNT>/<REPOSITORY>
4646
```
4747

4848
1. Open in Visual Studio Code:
4949

5050
```bash
51-
code YOUR-REPO-NAME
51+
code <REPOSITORY>
5252
```
5353

5454
---
@@ -57,7 +57,7 @@ Visual Studio Code uses Git authentication provided by the operating system (suc
5757

5858
## Open your local repository
5959

60-
If you have an existing repository on your local computer and want to open it in Visual Studio Code, just open the folder. Visual Studio Code recognizes the `.git` subfolder and display the relevant information.
60+
If you have an existing repository on your local computer and want to open it in Visual Studio Code, just open the folder. Visual Studio Code recognizes the `.git` subfolder and displays the relevant information.
6161

6262
### [Activity bar](#tab/activity-bar)
6363

@@ -170,7 +170,7 @@ Create a new branch to capture changes and isolate from the main or default bran
170170
171171
## Commit changes locally
172172
173-
Once you have made changes on your branch, commit the changes.
173+
Once you make changes to files on your branch, commit the changes.
174174
175175
### [Activity bar](#tab/activity-bar)
176176
@@ -220,7 +220,7 @@ This action isn't available from this feature. Select a different tab.
220220
221221
1. Open the command palette with the key combination of <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>.
222222
1. In the command palette, filter with `Git` then select `Push`.
223-
1. If you have multiple upstream remotes, select the remote then press <kbd>Enter</kbd>.
223+
1. If you have multiple upstream remotes, select a remote name then press <kbd>Enter</kbd>.
224224
225225
226226
### [Integrated terminal](#tab/integrated-terminal)
@@ -236,7 +236,7 @@ This action isn't available from this feature. Select a different tab.
236236
237237
## View Git output
238238
239-
You can view the Git commands run when you use the Source control extension. This helps debug when a command fails.
239+
You can view the Git commands output when you use the Source control extension. This helps debug when a command fails.
240240
241241
1. Select the Source Control icon from the activity bar.
242242
1. Select the ellipsis (...) then select **Show Git Output**.

articles/javascript/tutorial/browser-file-upload-azure-storage-blob.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: scenarios:getting-started, languages:JavaScript, devx-track-js, azure
1313
Use a static web app to upload files directly to an Azure Storage blob using the @azure/storage-blob package. The API generates a SAS token following the [Valet Key pattern](/azure/architecture/patterns/valet-key), which lets you securely delegate limited access without exposing full credentials.
1414

1515
> [!CAUTION]
16-
> This tutorial shows you how to host your function app in a Consumption Plan. When you plan to secure your connections by using Microsoft Entra ID with managed identities, you should instead consider hosting your app in the [Flex Consumption plan](/azure/azure-functions/flex-consumption-plan). The Flex Consumption plan has been designed to optimize security by supporting the use of managed identities without any of the tradeoffs required when running in a Consumption or Premium plan. Flex Consumption also fully supports virtual network integration.
16+
> This tutorial shows you how to host your function app in a Consumption Plan. When you plan to secure your connections by using Microsoft Entra ID with managed identities, you should instead consider hosting your app in the [Flex Consumption plan](/azure/azure-functions/flex-consumption-plan). The **Flex Consumption** tier optimizes security by supporting the use of managed identities and virtual network integration.
1717
1818
## Prerequisites
1919

@@ -126,10 +126,10 @@ The [Dev Containers extension](https://marketplace.visualstudio.com/items?itemNa
126126
>
127127
> :::image type="content" source="media/browser-file-upload-azure-storage-blob/open-terminal-option.png" lightbox="media/browser-file-upload-azure-storage-blob/open-terminal-option.png" alt-text="Screenshot of the menu option to open a new terminal.":::
128128

129-
1. Clone your fork into the current directory. Replace `YOUR-ACCOUNT` in the following command with your account name.
129+
1. Clone your fork into the current directory. Replace `<YOUR-ACCOUNT>` in the following command with your account name.
130130

131131
```bash
132-
git clone https://github.com/YOUR-ACCOUNT/azure-typescript-e2e-apps
132+
git clone https://github.com/<YOUR-ACCOUNT>/azure-typescript-e2e-apps
133133
```
134134

135135
1. Open the **Command Palette**, search for the **Dev Containers** commands, and then select **Dev Containers: Reopen in Container**.
@@ -188,9 +188,9 @@ The sample app for this tutorial is in the `azure-upload-file-to-storage` folder
188188

189189
<a name="3-create-storage-resource-with-visual-studio-extension"></a>
190190

191-
## Create Storage resource with Visual Studio extension
191+
## Create storage resource with Visual Studio extension
192192

193-
Create the Storage resource to use with the sample app. Storage is used for:
193+
Create the Azure Storage resource to use with the sample app. Storage is used for:
194194

195195
* Triggers in the Azure Functions app
196196
* Blob (file) storage
@@ -206,7 +206,7 @@ Create the Storage resource to use with the sample app. Storage is used for:
206206
207207
|Property|Value|
208208
|--|--|
209-
|Enter a globally unique name for the new web app.| Enter a unique value such as `fileuploadstor`, for your Storage resource name.<br><br> This unique name is **your resource name** used in the next section. Use only characters and numbers, up to 24 in length. You need this **account name** to use later.|
209+
|Enter a globally unique name for the new web app.| Enter a unique value such as `fileuploadstor`, for your Storage resource name.<br><br> This unique name is **your resource name** used in the next section. Use a maximum of 24 alphanumeric characters in length. You need this **account name** to use later.|
210210
|Select a location for new resources.|Use the recommended location.|
211211
212212
1. When the app creation process is complete, a notification appears with information about the new resource.
@@ -249,9 +249,9 @@ Create a private container which has publicly readable blobs.
249249
250250
## Grant yourself Blob Data access
251251
252-
While you created the resource, you don't have permission to view the contents of the container. That is reserved for specific IAM roles. Add your account so you can view the blobs in the containers.
252+
While you created the resource, you don't have permission to view the contents of the container. This authorization is reserved for specific IAM roles. Add your account so you can view the blobs in the containers.
253253
254-
1. Still in the Azure portal storage account, select **Access Control (IAM)**.
254+
1. In the Azure portal storage account, select **Access Control (IAM)**.
255255
1. Select **Add role assignments**.
256256
1. Search and select **Storage Blob Data Contributor**. Select **Next**.
257257
1. Select **+ Select members**.
@@ -265,7 +265,7 @@ The Storage resource credentials are used in the Azure Functions API app to conn
265265
266266
1. While still in the Azure portal, in the **Security + networking** section, select **Access keys**.
267267
1. Copy the `Key ` key.
268-
1. In Visual Studio Code, in the `./workspaces/azure-typescript-e2e-apps/azure-upload-file-to-storage/api`folder, **rename** the file from `local.settings.json.sample` to `local.settings.json`. The file is ignored by Git so it won't be checked into source control.
268+
1. In Visual Studio Code, in the `./workspaces/azure-typescript-e2e-apps/azure-upload-file-to-storage/api`folder, **rename** the file from `local.settings.json.sample` to `local.settings.json`. The file is ignored by Git so it isn't be checked into source control.
269269
1. Update the settings for `local.settings.json` using the following table.
270270
271271
|Property|Value|Description|
@@ -274,7 +274,7 @@ The Storage resource credentials are used in the Azure Functions API app to conn
274274
|Azure_Storage_AccountKey|Azure Storage account key|Used in source code to connect to Storage resource.|
275275
|AzureWebJobsStorage|Azure Storage account connection string|Use by Azure Functions runtime to store state and logs.|
276276
277-
It may seem like you entered the same account credentials twice, once as a key and once as a connection string. You did, but specifically for this simple tutorial. Generally speaking, Azure Functions apps should have a separate Storage resource that isn't reused for another purpose. When you create the Azure Function resource later in the tutorial, you won't need to set the **AzureWebJobsStorage** value for the cloud resource. You'll only need to set the **Azure_Storage_AccountName** and **Azure_Storage_AccountKey** values which are used in source code.
277+
It may seem like you entered the same account credentials twice, once as a key and once as a connection string. You did, but specifically for this simple tutorial. Generally speaking, Azure Functions apps should have a separate Storage resource that isn't reused for another purpose. When you create the Azure Function resource later in the tutorial, you won't need to set the **AzureWebJobsStorage** value for the cloud resource. You'll need to set the **Azure_Storage_AccountName** and **Azure_Storage_AccountKey** values which are used in source code.
278278
279279
## Run the API app
280280
@@ -312,7 +312,7 @@ Run the Functions App to make sure it works correctly before deploying it to Azu
312312
"url":"https://YOUR-STORAGE-RESOURCE.blob.core.windows.net/upload/test.png?sv=2023-01-03&spr=https&st=2023-07-26T22%3A15%3A59Z&se=2023-07-26T22%3A25%3A59Z&sr=b&sp=w&sig=j3Yc..."
313313
}
314314
```
315-
1. Copy the base of the API URL in the browser address bar (not the SAS token URL in the JSON object) to use in the next step. The base URL is everything before `/api/sas`. You will paste this into the client app environment variable file in the next section.
315+
1. Copy the base of the API URL in the browser address bar (not the SAS token URL in the JSON object) to use in the next step. The base URL is everything before `/api/sas`. You'll paste this base URL into the client app environment variable file in the next section.
316316
317317
## Configure and run the client app
318318
@@ -339,7 +339,7 @@ Run the Functions App to make sure it works correctly before deploying it to Azu
339339
340340
1. Select the **Ports** tab in the bottom pane then right-click the **5173** port and select the globe icon.
341341
342-
1. You should see the simple web app.
342+
1. You should see the web app.
343343
344344
:::image type="content" source="media/browser-file-upload-azure-storage-blob/browser-app-select-file.png" alt-text="Screenshot of web browser showing web app with Select File button available.":::
345345
@@ -360,7 +360,7 @@ Run the Functions App to make sure it works correctly before deploying it to Azu
360360
361361
## Deploy static web app to Azure
362362
363-
The Azure Functions app is using a preview feature, it must be deployed to **West US 2** to function properly.
363+
The Azure Functions app is using a preview feature. It must be deployed to **West US 2** to function properly.
364364
365365
1. In Visual Studio Code, select the Azure explorer.
366366
@@ -383,7 +383,7 @@ The Azure Functions app is using a preview feature, it must be deployed to **Wes
383383
|*Choose build preset to configure default project structure.*|Select **Custom**.|
384384
|*Select the location of your application code*|`azure-upload-file-to-storage/app`|
385385
|*Select the location of your Azure Functions code*|`azure-upload-file-to-storage/api`|
386-
|*Enter the path of your build output...*|`dist`<br><br>This is the path from your app to your static (generated) files.|
386+
|*Enter the path of your build output...*|`dist`<br><br> value is the path from your app to your static (generated) files.|
387387
|*Select a location for new resources.*|Select a region close to you.|
388388
389389
1. When the process is complete, a notification pop-up displays. Select **View/Edit Workflow**.
@@ -406,7 +406,7 @@ The Azure Functions app is using a preview feature, it must be deployed to **Wes
406406
###### End of Repository/Build Configurations ######
407407
```
408408
409-
1. Go to your GitHub fork of the sample, `https://github.com/YOUR-ACCOUNT/azure-typescript-e2e-apps/actions` to verify the build and deploy action, named `Azure Static Web Apps CI/CD`, completed successfully. This may take a few minutes to complete.
409+
1. Go to your GitHub fork of the sample, `https://github.com/<YOUR-ACCOUNT>/azure-typescript-e2e-apps/actions` to verify the build and deploy action, named `Azure Static Web Apps CI/CD`, completed successfully. This action may take a few minutes to complete.
410410
411411
1. Go to your Azure portal for your app and view the **APIs** section of **Settings**. The **Backend Resource Name** in the production environment is `(managed)` indicating your APIs are successfully deployed.
412412
1. Select **(managed)** to see the list of APIs loaded in the app:
@@ -446,13 +446,13 @@ Verify the deploy and configuration succeeded by using the web site.
446446
447447
## Clean up resources
448448
449-
In Visual Studio Code, use the Azure explorer for Resource Groups, right-click on your resource group then select **Delete**.
449+
In Visual Studio Code, use the Azure explorer for Resource Groups. Right-click on your resource group then select **Delete**.
450450
451-
This deletes all resources in the group, including your Storage and Static Web app resources.
451+
This action deletes all resources in the group, including your Storage and Static Web app resources.
452452
453453
## Troubleshooting
454454
455-
Report [issues](https://github.com/Azure-Samples/azure-typescript-e2e-apps/issues) with this sample in the GitHub repo noted below. Include the following with the issue:
455+
Report [issues](https://github.com/Azure-Samples/azure-typescript-e2e-apps/issues) with this sample in the GitHub repo. Include the following with the issue:
456456
457457
* The URL of the article
458458
* The step or context within the article that was problematic

0 commit comments

Comments
 (0)