Skip to content

Commit

Permalink
Merge pull request #1120 from EscolaLMS/featur/WELLMS-549
Browse files Browse the repository at this point in the history
Featur/wellms 549
  • Loading branch information
victazzz authored Feb 21, 2025
2 parents c6629ae + f8790f8 commit 44778db
Show file tree
Hide file tree
Showing 9 changed files with 13,241 additions and 12 deletions.
5 changes: 3 additions & 2 deletions config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default defineConfig({
* @doc https://umijs.org/docs/api/config#hash
*/
hash: true,

history: { type: 'hash' },
base: '/',
history: { type: 'browser' },

/**
* @name 兼容性设置
Expand Down Expand Up @@ -159,4 +159,5 @@ export default defineConfig({
typeof REACT_APP_SENTRY_RELEASE !== 'undefined' ? REACT_APP_SENTRY_RELEASE : '',
},
devtool: 'source-map',
plugins: [require.resolve('./plugin-scorm.ts')],
});
14 changes: 14 additions & 0 deletions config/plugin-scorm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { IApi } from 'umi';

export default (api: IApi) => {
api.addBeforeMiddlewares(() => [
(req, res, next) => {
if (req.url.startsWith('/courses/scorms/preview/__scorm__/')) {
res.statusCode = 404;
res.end('Not found (blocked by scormIntercept plugin)');
return;
}
next();
},
]);
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@escolalms/gift-pegjs": "^0.2.8",
"@escolalms/h5p-react": "^0.2.18",
"@escolalms/markdown-editor": "^12.0.6",
"@escolalms/scorm-player": "^0.0.0",
"@escolalms/ts-models": "^0.0.35",
"@sentry/cli": "^2.40.0",
"@sentry/esbuild-plugin": "^2.22.7",
Expand Down
Loading

0 comments on commit 44778db

Please sign in to comment.