{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/javascript/sourcemaps/multiple-origins/","result":{"data":{"file":{"id":"5945ea23-8d6f-5859-a1f8-ecd4b6cc31a1","relativePath":"javascript/common/sourcemaps/multiple-origins.mdx","sourceInstanceName":"platforms","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Multiple Origins\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Note = makeShortcode(\"Note\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"It\\u2019s not uncommon for a web application to be accessible at multiple origins. For example:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Website is operable over both \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"https\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"http\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Geolocated web addresses: such as \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"https://us.example.com\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"https://eu.example.com\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Multiple static CDNs: such as \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"https://static1.example.com\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"https://static2.example.com\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Customer-specific domains/subdomains\")), mdx(\"p\", null, \"In this situation, \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"identical\"), \" JavaScript and source map files may be located at two or more distinct origins. In this situation we recommend using our special tilde (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"~\"), \") prefix on paths.\"), mdx(\"p\", null, \"So for example, if you have the following:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://static1.example.com/js/app.js\"\n  }), \"https://static1.example.com/js/app.js\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://static2.example.com/js/app.js\"\n  }), \"https://static2.example.com/js/app.js\"))), mdx(\"p\", null, \"You can upload using the URL of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"~/js/app.js\"), \". This will tell Sentry to ignore the domain and use the artifact for any origin.\"), mdx(\"p\", null, \"Additionally you can also upload the same file under multiple names. Under the hood Sentry will deduplicate these.\"), mdx(Note, {\n    mdxType: \"Note\"\n  }, mdx(\"markdown\", null, mdx(\"p\", null, \"The ~ prefix tells Sentry that for a given URL, \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"any\"), \" combination of protocol and hostname whose path is \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/js/app.js\"), \" should use this artifact. Use this method \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"only\"), \" if your source/source map files are identical at all possible protocol/hostname combinations. \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Sentry will prioritize full URLs over tilde prefixed paths\"), \", if found.\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"It’s not uncommon for a web application to be accessible at multiple origins. For example: Website is operable over both  https  and  http Geolocated web addresses: such as  https://us.example.com ,  https://eu.example.com Multiple static CDNs: such as  https://static1.example.com ,  https://static2.example.com Customer-specific domains/subdomains In this situation,  identical  JavaScript and source map files may be located at two or more distinct origins. In this situation we recommend using our special tilde ( ~ ) prefix on paths. So for example, if you have the following: https://static1.example.com/js/app.js https://static2.example.com/js/app.js You can upload using the URL of  ~/js/app.js . This will tell Sentry to ignore the domain and use the artifact for any origin. Additionally you can also upload the same file under multiple names. Under the hood Sentry will deduplicate these. The ~ prefix tells Sentry that for a given URL,  any  combination of protocol and hostname whose path is  /js/app.js  should use this artifact. Use this method  only  if your source/source map files are identical at all possible protocol/hostname combinations.  Sentry will prioritize full URLs over tilde prefixed paths , if found.","title":"Multiple Origins","platform":{"name":"javascript","title":"JavaScript"},"notoc":true,"id":"5945ea23-8d6f-5859-a1f8-ecd4b6cc31a1"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}