update
This commit is contained in:
@@ -21,6 +21,7 @@ async function populateResources() {
|
||||
topicResources[topicId] ||= [];
|
||||
topicResources[topicId].push({
|
||||
id: resourceId,
|
||||
filename: `${resourceId}.md`,
|
||||
version: parseInt(parts[3].substring(2)),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -121,7 +121,13 @@ function errorRequestHandler(error, _req, res, next) {
|
||||
}
|
||||
|
||||
function isOriginAllowed(origin) {
|
||||
console.log({ origin });
|
||||
const url = new URL(origin);
|
||||
|
||||
if (url.hostname === "localhost" || url.hostname === "127.0.0.1") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return url.hostname.endsWith("tomastm.com");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user