crash.software
Projects
Pull Requests
Issues
Builds
gradejs
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
gradejs
Commits
6ba0febf
🤬
Sign In
fix: cors allowlist (
#50
)
Oleg Klimenko
committed with
GitHub
2 years ago
6ba0febf
1 parent
bdbe237f
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
Total 1 files
■
■
■ ■ ■ ■
packages/public-api/src/middleware/common.ts
skipped 7 lines
8
8
export const cors = createCorsMiddleware({
9
9
maxAge: 1800,
10
10
origin: function (origin, callback) {
11
-
if (origin && originAllowList.includes(origin)) {
11
+
if (
originAllowList
.
length
=
=
=
0
|
|
(
origin && originAllowList.includes(origin
)
)) {
12
12
callback(null, true);
13
13
} else {
14
14
callback(new Error('Not allowed by CORS'));
skipped 30 lines
All occurrences
Please wait...
Page is in error, reload to recover