Skip to content

Commit

Permalink
Fix build fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 11, 2023
1 parent da6f825 commit 0a069d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion releases/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN make

# http://releases.ubuntu.com/focal/
#FROM ${ARCH}ubuntu:focal AS dist
FROM ${ARCH}ossrs/srs-stack:focal-1 AS dist
FROM ${ARCH}ubuntu:focal AS dist

COPY --from=build /g/releases/releases /usr/local/srs-stack/releases/releases

Expand Down
3 changes: 1 addition & 2 deletions ui/src/components/UrlGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export function buildUrls(defaultUrl, secret, env) {
a.href = `${window.location.protocol}//${window.location.host}/${defaultUrl}`;

const defaultSchema = a.protocol.replace(':', '');
const defaultHost = a.host;
const defaultHostname = a.hostname;
const defaultPort = a.port || (a.protocol === 'http:' ? 80 : 443);
const defaultApp = a.pathname.substring(1, a.pathname.lastIndexOf("/"));
Expand Down Expand Up @@ -193,7 +192,7 @@ export default function useUrls() {
setTranscodeStreamKey(urls.transcodeStreamKey);
setTranscodeFlvPlayer(urls.transcodeFlvPlayer);
}
}, [loading, secret, rtmpStreamName])
}, [loading, secret, rtmpStreamName, env])

return {
// For basic stream.
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/ScenarioTranscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function ScenarioTranscodeImpl({activeKey, urls, defaultEnabled, defaultConf}) {
refreshTask();
const timer = setInterval(() => refreshTask(), 10 * 1000);
return () => clearInterval(timer);
}, [handleError, urls, setTask, setTaskInputUrls, setTaskOutputUrls]);
}, [handleError, urls, setTask, setTaskInputUrls, setTaskOutputUrls, env]);

const updateTranscodeStatus = React.useCallback((enabled, success) => {
if (!vbitrate || vbitrate < 100 || vbitrate > 100*1000) return alert(`Invalid vbitrate ${vbitrate}, should be in [100, 100000] Kbps`);
Expand Down
7 changes: 5 additions & 2 deletions ui/src/pages/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,10 @@ function SettingHttpsImpl({config}) {
const handleError = useErrorHandler();
const {t} = useTranslation();

const domainRegex = /^(?=.{1,253})(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.?)+[A-Za-z]{2,6}$/;
const domainRegex = React.useMemo(() => {
return /^(?=.{1,253})(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.?)+[A-Za-z]{2,6}$/;
}, []);

React.useEffect(() => {
if (!domainRegex.test(window.location.hostname)) return;
if (domain) return;
Expand Down Expand Up @@ -624,7 +627,7 @@ function SettingHttpsImpl({config}) {
alert(t('settings.sslLetsOk'));
console.log(`SSL: Let's Encrypt SSL ok`);
}).catch(handleError).finally(setOperating);
}, [handleError, domain, t, setOperating]);
}, [handleError, domain, t, setOperating, domainRegex]);

const defaultKey = config?.provider === 'ssl' ? '1' : '0';
return (
Expand Down

0 comments on commit 0a069d5

Please sign in to comment.