-
-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: read logs and update cors maintenance root-role permissions #8996
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
343a857
to
f8a62ef
Compare
@Tymek, core features have been modified in this pull request. Please review carefully! |
async setCors( | ||
req: IAuthRequest<void, void, SetCorsSchema>, | ||
res: Response<string>, | ||
): Promise<void> { | ||
const granularAdminPermissions = this.flagResolver.isEnabled( | ||
'granularAdminPermissions', | ||
); | ||
|
||
if (!granularAdminPermissions) { | ||
throw new NotFoundError(); | ||
} | ||
|
||
if (req.body.frontendApiOrigins) { | ||
await this.frontendApiService.setFrontendCorsSettings( | ||
req.body.frontendApiOrigins, | ||
req.audit, | ||
); | ||
res.sendStatus(204); | ||
return; | ||
} | ||
|
||
throw new NotFoundError(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous "setUiConfig" is a generic name, but it only sets CORS. For easy transition into endpoint with proper permissions it's easier to create new one, and avoid potential errors or confusion about permissions in the future.
About the changes
Closes #
Important files
Discussion points