Revert public host config
This commit is contained in:
@ -58,4 +58,5 @@ public sealed class S3BlobConfig
|
||||
public string? Region { get; init; }
|
||||
public string BucketName { get; init; } = "zap-stream-dvr";
|
||||
public bool DisablePayloadSigning { get; init; }
|
||||
public Uri PublicHost { get; init; } = null!;
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ public class SrsController : Controller
|
||||
Variant = appSplit.Length > 1 ? appSplit[1] : "",
|
||||
ClientId = req.ClientId!,
|
||||
StreamId = req.StreamId ?? req.ClientId!,
|
||||
StreamKey = req.Stream
|
||||
StreamKey = req.Stream,
|
||||
EdgeIp = req.Ip!
|
||||
});
|
||||
|
||||
if (req.Action == "on_forward")
|
||||
|
@ -74,11 +74,17 @@ public class S3DvrStore : IDvrStore
|
||||
Expires = new DateTime(3000, 1, 1)
|
||||
});
|
||||
|
||||
var ub = new UriBuilder(url)
|
||||
{
|
||||
Scheme = _config.PublicHost.Scheme,
|
||||
Host = _config.PublicHost.Host
|
||||
};
|
||||
|
||||
var tsUpload = sw.Elapsed;
|
||||
|
||||
_logger.LogInformation("download={tc:#,##0}ms, probe={pc:#,##0}ms, upload={uc:#,##0}ms", tsDownload.TotalMilliseconds,
|
||||
tsProbe.TotalMilliseconds, tsUpload.TotalMilliseconds);
|
||||
|
||||
return new(new Uri(url), probe.Duration.TotalSeconds);
|
||||
return new(ub.Uri, probe.Duration.TotalSeconds);
|
||||
}
|
||||
}
|
||||
|
@ -11,4 +11,6 @@ public class StreamInfo
|
||||
public string ClientId { get; init; } = null!;
|
||||
|
||||
public string StreamId { get; init; } = null!;
|
||||
|
||||
public string EdgeIp { get; init; } = null!;
|
||||
}
|
||||
|
@ -28,7 +28,8 @@
|
||||
"DvrStore": {
|
||||
"ServiceUrl": "http://localhost:9010",
|
||||
"AccessKey": "TQcxug1ZAXfnZ5bvc9n5",
|
||||
"SecretKey": "p7EK4qew6DBkBPqrpRPuJgTOc6ChUlfIcEdAwE7K"
|
||||
"SecretKey": "p7EK4qew6DBkBPqrpRPuJgTOc6ChUlfIcEdAwE7K",
|
||||
"PublicHost": "http://localhost:9010"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user