Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Remove response headers
Browse files Browse the repository at this point in the history
  • Loading branch information
geneh committed Apr 21, 2017
1 parent f615c79 commit ea683d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const mode = config.get('CRAWLER_MODE') || '';
const service = CrawlerFactory.createService(mode);
const app = express();

app.disable('x-powered-by');
app.use(logger('dev'));
app.use(sendHelper());

Expand Down
8 changes: 7 additions & 1 deletion web.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@

<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
<requestFiltering>
<requestFiltering removeServerHeader="true">
<hiddenSegments>
<remove segment="bin"/>
</hiddenSegments>
</requestFiltering>
</security>

<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>

<!-- Make sure error responses are left untouched -->
<httpErrors existingResponse="PassThrough" />

Expand Down

0 comments on commit ea683d8

Please sign in to comment.