GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — https/src/https/angular/ns-https.module.ts at master · nativescript-community/https

Expand file tree

/

ns-https.module.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
40 lines (38 loc) · 1.86 KB
/

ns-https.module.ts

Copy path

File metadata and controls

40 lines (38 loc) · 1.86 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.