Skip to content

Commit

Permalink
fix with double backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
fbianchicodermine committed Feb 19, 2025
1 parent 38c90fc commit 32e3633
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/pn-pa-webapp/public/js/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const regex = new RegExp('https://selfcare\.(((dev|test|uat|hotfix)\.)?)notifichedigitali\.it')
const regex = new RegExp('https://selfcare\\.(((dev|test|uat|hotfix)\\.)?)notifichedigitali\\.it')
const origin = window.origin;
if (regex.test(origin)) {
document.write(`<meta name="robots" content="noindex">`);
Expand Down
2 changes: 2 additions & 0 deletions packages/pn-pa-webapp/src/__test__/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ describe('config.js behavior', () => {
'https://selfcare.testnotifichedigitali.it',
'https://selfcare.prod.notifichedigitali.it',
'https://otherapp.dev.notifichedigitali.it',
'https://selfcare.notifichedigitali-it',
'https://selfcare-notifichedigitali.it',
];

for (const origin of origins) {
Expand Down
2 changes: 1 addition & 1 deletion packages/pn-personafisica-login/public/js/redirect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const regex = new RegExp('https://login\.(((dev|test|uat|hotfix)\.)?)notifichedigitali\.it')
const regex = new RegExp('https://login\\.(((dev|test|uat|hotfix)\\.)?)notifichedigitali\\.it')
const origin = window.origin;
if (regex.test(origin)) {
const matches = origin.match(regex);
Expand Down
2 changes: 1 addition & 1 deletion packages/pn-personafisica-webapp/public/js/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const regex = new RegExp('https://cittadini\.(((dev|test|uat|hotfix)\.)?)notifichedigitali\.it')
const regex = new RegExp('https://cittadini\\.(((dev|test|uat|hotfix)\\.)?)notifichedigitali\\.it')
const origin = window.origin;
if (regex.test(origin)) {
document.write(`<meta name="robots" content="noindex">`);
Expand Down
2 changes: 1 addition & 1 deletion packages/pn-personagiuridica-webapp/public/js/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const regex = new RegExp('https://imprese\.(((dev|test|uat|hotfix)\.)?)notifichedigitali\.it')
const regex = new RegExp('https://imprese\\.(((dev|test|uat|hotfix)\\.)?)notifichedigitali\\.it')
const origin = window.origin;
if (regex.test(origin)) {
document.write(`<meta name="robots" content="noindex">`);
Expand Down

0 comments on commit 32e3633

Please sign in to comment.