Merge pull request #684 from TeamPiped/federated-georestriction-bypass

Check if authenticated before helping other instances for bypassing georestrictions
This commit is contained in:
Kavin 2023-08-27 13:41:23 +00:00 committed by GitHub
commit 40a8fa357a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,7 @@ public class SyncRunner implements Runnable {
var type = event.get("type").asText(); var type = event.get("type").asText();
var content = event.at("/content/content"); var content = event.at("/content/content");
if (type.startsWith("video.piped.stream.bypass.")) { if (!UNAUTHENTICATED && type.startsWith("video.piped.stream.bypass.")) {
switch (type) { switch (type) {
case "video.piped.stream.bypass.request" -> { case "video.piped.stream.bypass.request" -> {
FederatedGeoBypassRequest bypassRequest = mapper.treeToValue(content, FederatedGeoBypassRequest.class); FederatedGeoBypassRequest bypassRequest = mapper.treeToValue(content, FederatedGeoBypassRequest.class);