Skip to content

Commit

Permalink
refactor: remove X-Download-Options header support
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Mar 23, 2021
1 parent 9e5884d commit d691d4a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 93 deletions.
8 changes: 0 additions & 8 deletions adonis-typings/shield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ declare module '@ioc:Adonis/Addons/Shield' {
preload?: boolean
}

/**
* Config for X-Download-Options
*/
export type IENoOpenOptions = {
enabled: boolean
}

/**
* Config for X-DNS-Prefetch-Control
*/
Expand Down Expand Up @@ -81,7 +74,6 @@ declare module '@ioc:Adonis/Addons/Shield' {
xFrame: XFrameOptions
contentTypeSniffing: ContentTypeSniffingOptions
hsts: HstsOptions
noOpen: IENoOpenOptions
dnsPrefetch: DnsPrefetchOptions
csp: CspOptions
csrf: CsrfOptions
Expand Down
1 change: 0 additions & 1 deletion src/ShieldMiddleware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class ShieldMiddleware {
shield.dnsPrefetchFactory(this.config.dnsPrefetch || {}),
shield.frameGuardFactory(this.config.xFrame || {}),
shield.hstsFactory(this.config.hsts || {}),
shield.noOpenFactory(this.config.noOpen || {}),
shield.noSniffFactory(this.config.contentTypeSniffing || {}),
]

Expand Down
28 changes: 0 additions & 28 deletions src/noOpen.ts

This file was deleted.

1 change: 0 additions & 1 deletion standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export { cspFactory } from './src/csp'
export { csrfFactory } from './src/csrf'
export { hstsFactory } from './src/hsts'
export { noOpenFactory } from './src/noOpen'
export { noSniffFactory } from './src/noSniff'
export { frameGuardFactory } from './src/frameGuard'
export { dnsPrefetchFactory } from './src/dnsPrefetch'
17 changes: 0 additions & 17 deletions templates/shield.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,6 @@ export const csrf: ShieldConfig['csrf'] = {
methods: ['POST', 'PUT', 'PATCH', 'DELETE'],
}

/*
|--------------------------------------------------------------------------
| No Open
|--------------------------------------------------------------------------
|
| This will prevent old versions of Internet Explorer from allowing
| malicious HTML downloads to be executed in the context of your
| site.
|
| By default, the security header is disabled, since not many websites are
| running on ie8 these days.
|
*/
export const noOpen: ShieldConfig['noOpen'] = {
enabled: false,
}

/*
|--------------------------------------------------------------------------
| DNS Prefetching
Expand Down
38 changes: 0 additions & 38 deletions test/no-open.spec.ts

This file was deleted.

0 comments on commit d691d4a

Please sign in to comment.