GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — https/src/https/angular/ns-https.module.ts at master · nativescript-community/https Expand file tree/ Copy pathns-https.module.tsMore file actions 40 lines (38 loc) · 1.86 KB / Copy pathns-https.module.tsFile metadata and controls40 lines (38 loc) · 1.86 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 import { NgModule, ModuleWithProviders, Optional, Inject, InjectionToken } from '@angular/core'; import { HttpBackend } from '@angular/common/http'; import { NativeScriptHttpClientModule } from '@nativescript/angular'; import { HttpsSSLPinningOptions, enableSSLPinning } from '@nativescript-community/https'; import { HTTPS_REQUEST_DEFAULT_OPTIONS, NativeScriptHttpXhrBackend, HttpsRequestDefaultOptions } from './ns-http-xhr-backend'; import { ExcludedService } from './excluded.service'; /** Page size injection token. */ export const HTTPS_SSL_PINNING_OPTIONS = new InjectionToken<HttpsSSLPinningOptions>('HTTPS_SSL_PINNING_OPTIONS'); @NgModule({ providers: [ ExcludedService, NativeScriptHttpXhrBackend, { provide: HttpBackend, useExisting: NativeScriptHttpXhrBackend }, { provide: HTTPS_REQUEST_DEFAULT_OPTIONS, useValue: {} }, { provide: HTTPS_SSL_PINNING_OPTIONS, useValue: { host: '', certificate: '' } } ], imports: [NativeScriptHttpClientModule], exports: [NativeScriptHttpClientModule] }) export class NativeScriptHttpsModule { constructor(@Optional()@Inject(HTTPS_SSL_PINNING_OPTIONS) defaults?: HttpsSSLPinningOptions) { enableSSLPinning(defaults ?? { host: '', certificate: '' }); } /** * Creates and configures a module. * @param defaults Https request default options. * @returns A wrapper around an NgModule that associates it with the providers. */ static forRoot(defaults: HttpsRequestDefaultOptions & HttpsSSLPinningOptions = { host: '', certificate: '' }): ModuleWithProviders<NativeScriptHttpsModule> { return { ngModule: NativeScriptHttpsModule, providers: [ { provide: HTTPS_REQUEST_DEFAULT_OPTIONS, useValue: defaults }, { provide: HTTPS_SSL_PINNING_OPTIONS, useValue: defaults } ] }; } } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |