Skip to content

Commit

Permalink
fix(browser-starfish) don't try to render relative urls (#63127)
Browse files Browse the repository at this point in the history
If an image src is a relative URL in the resource summary sample images,
we shouldn't try to load it, as it will be relative to sentry's domain!
  • Loading branch information
DominikB2014 authored Jan 12, 2024
1 parent 7f699a4 commit 4a2dfb2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ function ImageContainer(props: {
const [hasError, setHasError] = useState(false);

const {fileName, size, src, showImage = true} = props;
const isRelativeUrl = src.startsWith('/');

return (
<div style={{width: '100%', wordWrap: 'break-word'}}>
{showImage && !hasError ? (
{showImage && !isRelativeUrl && !hasError ? (
<div
style={{
width: imageWidth,
Expand Down

0 comments on commit 4a2dfb2

Please sign in to comment.