Skip to content

Commit 490d770

Browse files
committed
ATLAS-5363: Atlas Documentation UI: REST API documentation styling broken on atlas.apache.org due to CSP violation
1 parent d34f875 commit 490d770

11 files changed

Lines changed: 256 additions & 224 deletions

File tree

docs/crypto-fallback.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
const crypto = require("crypto");
20+
const originalCreateHash = crypto.createHash;
21+
crypto.createHash = (algorithm) => originalCreateHash(algorithm === "md4" ? "sha256" : algorithm);
22+
23+
process.on("uncaughtException", function (err) {
24+
if (err.code === "ECONNRESET") {
25+
console.log("Ignoring expected ECONNRESET error on Node 22");
26+
return;
27+
}
28+
throw err;
29+
});
30+

docs/doczrc.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ import versions from './docz-lib/config/versions';
2222
module.exports = {
2323
title: "Apache Atlas – Data Governance and Metadata framework for Hadoop",
2424
description: "Apache Atlas – Data Governance and Metadata framework for Hadoop",
25+
ignore: ['**/RenamePropagation.md', '**/readme.md'],
2526
files: "**/*.{md,mdx}",
2627
base: "/",
2728
baseUrl:"./public",
2829
src: "./src",
2930
public: "./src/resources",
30-
dest: '/site',
31+
dest: 'site',
3132
menu: menu,
3233
atlasVersions: versions,
3334
theme: "theme/",
@@ -38,14 +39,16 @@ module.exports = {
3839
config.module.rules.push(
3940
{
4041
test: /\.(js)$/,
41-
exclude: /node_modules/,
42+
exclude: /node_modules\/(?!(axios)\/)/,
4243
use: {
4344
loader: "babel-loader",
4445
query: {
4546
presets: ["@babel/react"],
4647
plugins: [
4748
"@babel/plugin-proposal-class-properties",
48-
"@babel/plugin-syntax-dynamic-import"
49+
"@babel/plugin-syntax-dynamic-import",
50+
"@babel/plugin-proposal-nullish-coalescing-operator",
51+
"@babel/plugin-proposal-optional-chaining"
4952
]
5053
}
5154
}

0 commit comments

Comments
 (0)