Skip to content

Commit

Permalink
Use HTTPS.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreif-funnel committed Jul 4, 2023
1 parent 2c3f50e commit 4d43ddf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class Ajv extends AjvCore {
: draft4MetaSchema
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false)
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID

// Add a copy of the schema for HTTPS references:
const httpsId = META_SCHEMA_ID.replace(/^http:/, "https:")
const httpsSchema = JSON.parse(JSON.stringify(metaSchema)) as AnySchemaObject
httpsSchema.id = httpsSchema.$schema = httpsId + "#"
this.addMetaSchema(httpsSchema, httpsId, false)
}

defaultMeta(): string | AnySchemaObject | undefined {
Expand Down

0 comments on commit 4d43ddf

Please sign in to comment.