Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 1.1KB

1234567891011121314151617181920212223
  1. /// <reference types="node" />
  2. import { IncomingMessage, ServerResponse } from "http"
  3. interface ContentSecurityPolicyDirectiveValueFunction {
  4. (req: IncomingMessage, res: ServerResponse): string
  5. }
  6. declare type ContentSecurityPolicyDirectiveValue = string | ContentSecurityPolicyDirectiveValueFunction
  7. export interface ContentSecurityPolicyOptions {
  8. useDefaults?: boolean
  9. directives?: Record<string, null | Iterable<ContentSecurityPolicyDirectiveValue> | typeof dangerouslyDisableDefaultSrc>
  10. reportOnly?: boolean
  11. }
  12. interface ContentSecurityPolicy {
  13. (options?: Readonly<ContentSecurityPolicyOptions>): (req: IncomingMessage, res: ServerResponse, next: (err?: Error) => void) => void
  14. getDefaultDirectives: typeof getDefaultDirectives
  15. dangerouslyDisableDefaultSrc: typeof dangerouslyDisableDefaultSrc
  16. }
  17. declare const dangerouslyDisableDefaultSrc: unique symbol
  18. declare const getDefaultDirectives: () => {
  19. [x: string]: Iterable<ContentSecurityPolicyDirectiveValue>
  20. }
  21. declare const contentSecurityPolicy: ContentSecurityPolicy
  22. export default contentSecurityPolicy
  23. export { getDefaultDirectives, dangerouslyDisableDefaultSrc }