Skip to content

Commit

Permalink
Merge pull request #211 from fingerprintjs/chore/INTER-554-revisit
Browse files Browse the repository at this point in the history
chore: expose global webcrypto
  • Loading branch information
TheUnderScorer authored Apr 8, 2024
2 parents 47c9263 + 6f41068 commit c2e9563
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions management/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ import { getSiteStatusUrl } from './site'
import { performHealthCheckAfterUpdate } from './healthCheck'
import { WEBSITE_RUN_FROM_PACKAGE, USER_ASSIGNED_ENTITY_CLIENT_ID } from './settings'
import { config } from './config'
import crypto from 'crypto'

const managementFn: AzureFunction = async (context: Context, timer: Timer) => {
if (timer.isPastDue) {
context.log('Timer function is running late!')
}

// @azure/arm-appservice uses library under the hood which needs access to global crypto object
Object.assign(global, {
crypto: crypto.webcrypto,
})

const env = gatherEnvs(context.log)

if (!env) {
Expand Down

0 comments on commit c2e9563

Please sign in to comment.