Merge branch 'feature/referer/header/field' of https://github.com/mdastgheib/restreamer-ui into mdastgheib-feature/referer/header/field

This commit is contained in:
Ingo Oppermann 2023-09-22 14:43:38 +02:00
commit 39dfd348db
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -67,6 +67,7 @@ const initSettings = (initialSettings) => {
forceFramerate: false,
framerate: 25,
userAgent: '',
referer: '',
http_proxy: '',
...settings.http,
};
@ -287,6 +288,10 @@ const createInputs = (settings, config, skills) => {
input.options.push('-user_agent', settings.http.userAgent);
}
if (settings.http.referer.length !== 0) {
input.options.push('-referer', settings.http.referer);
}
if (settings.http.http_proxy.length !== 0) {
input.options.push('-http_proxy', settings.http.http_proxy);
}
@ -546,6 +551,15 @@ function AdvancedSettings(props) {
onChange={props.onChange('http', 'userAgent')}
/>
</Grid>
<Grid item xs={12}>
<TextField
variant="outlined"
fullWidth
label="Referer"
value={settings.http.referer}
onChange={props.onChange('http', 'referer')}
/>
</Grid>
<Grid item xs={12}>
<TextField
variant="outlined"