Merge branch 'canon-merge-field-input' of https://github.com/backstage/backstage into canon-merge-field-input
This commit is contained in:
@@ -98,7 +98,8 @@ async function submitForm(value: string) {
|
||||
try {
|
||||
const url = new URL(value);
|
||||
|
||||
if (url.hostname.endsWith('example.com')) {
|
||||
const allowedHosts = ['example.com', 'beta.example.com', 'www.example.com'];
|
||||
if (!allowedHosts.includes(url.hostname)) {
|
||||
return { error: 'The example domain is not allowed' };
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user