|
|
@@ -1,6 +1,5 @@
|
|
|
const Settings = require('settings-sharelatex')
|
|
|
const { URL } = require('url')
|
|
|
-const isDataUrl = require('valid-data-url')
|
|
|
|
|
|
function getSafeRedirectPath(value) {
|
|
|
const baseURL = Settings.siteUrl // base URL is required to construct URL from path
|
|
|
@@ -15,11 +14,6 @@ function getSafeRedirectPath(value) {
|
|
|
const UrlHelper = {
|
|
|
getSafeRedirectPath,
|
|
|
wrapUrlWithProxy(url) {
|
|
|
- // we already have the data for data URLs
|
|
|
- if (isDataUrl(url)) {
|
|
|
- return url
|
|
|
- }
|
|
|
-
|
|
|
// TODO: Consider what to do for Community and Enterprise edition?
|
|
|
if (!Settings.apis.linkedUrlProxy.url) {
|
|
|
throw new Error('no linked url proxy configured')
|
|
|
@@ -28,7 +22,7 @@ const UrlHelper = {
|
|
|
},
|
|
|
|
|
|
prependHttpIfNeeded(url) {
|
|
|
- if (!url.match('://') && !isDataUrl(url)) {
|
|
|
+ if (!url.match('://')) {
|
|
|
url = `http://${url}`
|
|
|
}
|
|
|
return url
|