Skip to content

Commit

Permalink
fix: resolves #158 - handle http URLs gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramk committed Nov 13, 2023
1 parent 4ba22c6 commit 6c4f21b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/status-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export default class StatusPage extends React.PureComponent {
const urlObject = new URL(url.inputValue);
if (urlObject.protocol !== 'https:') {
url.validationText =
'Please use Secure Socket Layer (HTTPS) protocol for this URL';
'Please try using Secure Socket Layer (HTTPS) protocol for this URL, and see if it works. Use of HTTP protocol is not allowed';
}
};

Expand Down
4 changes: 2 additions & 2 deletions nerdlets/status-page-dashboard/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class StatusPagesDashboard extends React.PureComponent {
? '. Please also '
: 'Please ';
urlField.validationText +=
'use Secure Socket Layer (HTTPS) protocol for this URL';
'try using Secure Socket Layer (HTTPS) protocol for this URL, and see if it works. Use of HTTP protocol is not allowed';
}
};

Expand Down Expand Up @@ -218,7 +218,7 @@ export default class StatusPagesDashboard extends React.PureComponent {
}
}

[corsProxyAddress, hostName, logoUrl].forEach((urlField, index) => {
[corsProxyAddress, hostName, logoUrl].forEach((urlField) => {
if (urlField?.inputValue) {
validateUrl(urlField);
if (urlField.validationText) isFormValid = false;
Expand Down

0 comments on commit 6c4f21b

Please sign in to comment.