aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-07 13:39:37 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-07 13:39:37 -0500
commit4b4c85d0dd299375b8743d2760218d08be968317 (patch)
tree202bd81ee6c490da4820c8852f7abe736e6d300a /src/client/views/nodes/PDFBox.tsx
parentb098f246644d531bbbff2cbc3a33f3b67410e798 (diff)
parentccd39c9a53ebf9aea84fcdcba6050145add4526f (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index 2f1e1832e..8370df6ba 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -21,6 +21,7 @@ import { pageSchema } from "./ImageBox";
import "./PDFBox.scss";
import React = require("react");
import { documentSchema } from '../../../new_fields/documentSchemas';
+import { url } from 'inspector';
type PdfDocument = makeInterface<[typeof documentSchema, typeof panZoomSchema, typeof pageSchema]>;
const PdfDocument = makeInterface(documentSchema, panZoomSchema, pageSchema);
@@ -61,7 +62,7 @@ export class PDFBox extends DocAnnotatableComponent<FieldViewProps, PdfDocument>
console.log("\nHere's the { url } being fed into the outer regex:");
console.log(href);
console.log("And here's the 'properPath' build from the captured filename:\n");
- if (matches !== null) {
+ if (matches !== null && href.startsWith(window.location.origin)) {
const properPath = Utils.prepend(`/files/pdfs/${matches[0]}`);
console.log(properPath);
if (!properPath.includes(href)) {