Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Remove 3rd party package for sanitizing URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
pjhampton committed Apr 21, 2022
1 parent 9be4e80 commit 9bbc4b7
Show file tree
Hide file tree
Showing 4 changed files with 338 additions and 20 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"test": "jest --coverage"
},
"dependencies": {
"@braintree/sanitize-url": "^6.0.0",
"axios": "^0.26.1"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions server/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { IRouter } from '../../../../src/core/server'
import formatter from '../../common/formatter'
import axios from 'axios'
import { sanitizeUrl } from '@braintree/sanitize-url'
import agent from '../helpers/server_client'

export function defineRoutes(router: IRouter, statsURI: string) {
Expand All @@ -15,7 +14,7 @@ export function defineRoutes(router: IRouter, statsURI: string) {
let reqProto = request.url.protocol || 'http:';
let reqHost = request.url.host?.replace(/:\d+/, '') || '127.0.0.1';
let reqPort = request.url.port || 5601;
let reqUrl = sanitizeUrl(`${reqProto}//${reqHost}:${reqPort}${statsURI}`);
let reqUrl = `${reqProto}//${reqHost}:${reqPort}${statsURI}`;

if (request.headers !== undefined
&& request.headers.authorization !== undefined) {
Expand Down
Loading

0 comments on commit 9bbc4b7

Please sign in to comment.