Skip to content

Commit

Permalink
feat(cors): add v2.caur-frontend.pages.dev; update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Dec 29, 2024
1 parent aeda31f commit 250159e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@
"dependency-graph": "^1.0.0",
"dockerode": "^4.0.2",
"express": "5.0.1",
"html-webpack-plugin": "^5.6.2",
"ioredis": "^5.4.1",
"moleculer": "^0.14.34",
"node-scp": "^0.0.23",
"node-telegram-bot-api": "^0.66.0",
"style-loader": "^4.0.0",
"typescript": "^5.6.3",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
"typescript": "^5.6.3"
},
"scripts": {
"build": "tsc && webpack",
Expand Down Expand Up @@ -56,6 +53,7 @@
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-tsdoc": "^0.3.0",
"html-webpack-plugin": "^5.6.2",
"jest": "^29.7.0",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.1.0",
Expand All @@ -67,7 +65,9 @@
"typed-moleculer": "^4.1.2",
"typedoc": "^0.26.10",
"typedoc-material-theme": "^1.1.0",
"typescript-eslint": "^8.10.0"
"typescript-eslint": "^8.10.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
"packageManager": "yarn@4.5.1"
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function main(): Promise<void> {
: null
: 2,
// This value is used to isolate builder nodes that are on a different version of the internal API than the coordinator.
version: current_version
version: current_version,
},
metrics: enableMetrics(mainOptions.command === "database"),
nodeID: nodeID,
Expand Down
2 changes: 1 addition & 1 deletion src/services/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class DatabaseService extends Service {

// Broadcast event to inform caur-backend to remove the packages from the database
void this.broker.broadcast<string[]>("database.removalComplete", data.pkgbases);

return {
success: true,
};
Expand Down
6 changes: 5 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ export const MAX_SHUTDOWN_TIME = 1000 * 30;
export const SOURCECACHE_MAX_LIFETIME = ONE_UNIX_MONTH;
export const HTTP_CACHE_MAX_AGE = ONE_UNIX_DAY;

export const ALLOWED_CORS_ORIGINS = ["https://aur.chaotic.cx", "https://caur-frontend.pages.dev"];
export const ALLOWED_CORS_ORIGINS = [
"https://aur.chaotic.cx",
"https://caur-frontend.pages.dev",
"https://v2.caur-frontend.pages.dev",
];
export const ALLOWED_CORS_METHODS = ["GET"];
export const corsOptions: CorsOptions = {
origin: ALLOWED_CORS_ORIGINS,
Expand Down

0 comments on commit 250159e

Please sign in to comment.