webcontextmanager redirect dep
This commit is contained in:
parent
c040db0c1f
commit
8620e52a7c
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Alphaland\Web\WebContextManager;
|
||||
|
||||
$fmt = $_GET['fmt'];
|
||||
$wd = $_GET['wd'];
|
||||
$ht = $_GET['ht'];
|
||||
|
|
@ -47,11 +49,11 @@ if ($check->rowCount() > 0) //asset exists on Alphaland
|
|||
//assuming its none of these asset types, redirect to ROBLOX
|
||||
if ($check->AssetTypeId == 4) //handle mesh asset, return default image for now (TODO: RENDER THESE)
|
||||
{
|
||||
redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
WebContextManager::Redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
}
|
||||
elseif ($check->AssetTypeId == 40) //handle MeshPart asset, return default image for now (TODO: RENDER THESE)
|
||||
{
|
||||
redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
WebContextManager::Redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
}
|
||||
elseif ($check->AssetTypeId == 10) //handle model asset, return default image for now (TODO: RENDER THESE)
|
||||
{
|
||||
|
|
@ -59,17 +61,17 @@ if ($check->rowCount() > 0) //asset exists on Alphaland
|
|||
{
|
||||
$thumbhash = $check->ThumbHash;
|
||||
|
||||
redirect("https://trcdn.alphaland.cc/" . $thumbhash);
|
||||
WebContextManager::Redirect("https://trcdn.alphaland.cc/" . $thumbhash);
|
||||
}
|
||||
redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
WebContextManager::Redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
}
|
||||
elseif ($check->AssetTypeId == 39) //handle SolidModel asset, return default image for now (TODO: RENDER THESE)
|
||||
{
|
||||
redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
WebContextManager::Redirect("https://tcdn.alphaland.cc/" . $defaultidhash);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
redirect(getRobloxAssetThumbnail($aid, $wd, $ht, $fmt));
|
||||
//WebContextManager::Redirect(getRobloxAssetThumbnail($aid, $wd, $ht, $fmt));
|
||||
}
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
use Alphaland\Web\WebContextManager;
|
||||
|
||||
$requesttype = $_GET['request'];
|
||||
$placeid = $_GET['placeId'];
|
||||
$userid = $_GET['userid'];
|
||||
$isTeleport = $_GET['isTeleport'];
|
||||
|
||||
redirect("https://www.alphaland.cc/Game/PlaceLauncher.ashx?request=" . $requesttype . "&placeId=" . $placeid . "&isTeleport=" . $isTeleport);
|
||||
WebContextManager::Redirect("https://www.alphaland.cc/Game/PlaceLauncher.ashx?request=" . $requesttype . "&placeId=" . $placeid . "&isTeleport=" . $isTeleport);
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
//turns out this is XML format
|
||||
|
||||
use Alphaland\Web\WebContextManager;
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: -1");
|
||||
|
|
@ -7760,6 +7762,6 @@ elseif ($sid)
|
|||
else
|
||||
{
|
||||
//idk just for compatibiliy if for some reason the game needs to use this
|
||||
redirect('https://assetgame.roblox.com/Game/Tools/InsertAsset.ashx?sid='. $sid);
|
||||
WebContextManager::Redirect('https://assetgame.roblox.com/Game/Tools/InsertAsset.ashx?sid='. $sid);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
RCCHeaderEnvironment();
|
||||
use Alphaland\Web\WebContextManager;
|
||||
|
||||
if (!WebContextManager::VerifyAccessKeyHeader())
|
||||
{
|
||||
die(http_response_code(401));
|
||||
}
|
||||
|
||||
header("Cache-Control: no-cache, no-store");
|
||||
header("Pragma: no-cache");
|
||||
|
|
|
|||
Loading…
Reference in New Issue