Skip to content

Commit

Permalink
Use SAS as key
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Apr 15, 2019
1 parent 0ac6904 commit 9b1ed43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/setJavaScriptContentType.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ const { extname } = require('path');

const {
Aborter,
AnonymousCredential,
BlobURL,
ContainerURL,
ServiceURL,
SharedKeyCredential,
StorageURL
} = require('@azure/storage-blob');

Expand All @@ -14,11 +14,11 @@ const BLOB_OPERATION_TIMEOUT = 15000;
const TARGET_EXTNAME = '.js';
const TARGET_CONTENT_TYPE = 'text/javascript; charset=utf-8';

async function main(accountName, accountKey, container, prefix) {
async function main(accountName, accountSAS, container, prefix) {
const containerURL = ContainerURL.fromServiceURL(
new ServiceURL(
`https://${ accountName }.blob.core.windows.net`,
StorageURL.newPipeline(new SharedKeyCredential(accountName, accountKey))
`https://${ accountName }.blob.core.windows.net${ accountSAS }`,
StorageURL.newPipeline(new AnonymousCredential())
),
container
);
Expand Down

0 comments on commit 9b1ed43

Please sign in to comment.