mirror of
https://github.com/openvk/openvk
synced 2025-07-03 06:19:49 +03:00
add /.well-known/assetlinks.json
Needed by android apps to automatically verify if the app is allowed to open links from this instance.
This commit is contained in:
parent
7cde47f2ac
commit
317945eabc
2 changed files with 26 additions and 0 deletions
|
@ -147,6 +147,30 @@ final class AboutPresenter extends OpenVKPresenter
|
|||
$this->redirect("https://github.com/openvk/openvk#readme");
|
||||
}
|
||||
|
||||
public function renderAssetLinksJSON(): void
|
||||
{
|
||||
# Необходимо любому андроид приложению для автоматического разрешения принимать ссылки с этого сайта.
|
||||
# Не шарю как писать норм на php поэтому тут чутка на вайбкодил - искренне ваш, ZAZiOs.
|
||||
header("Content-Type: application/json");
|
||||
|
||||
$data = [
|
||||
[
|
||||
"relation" => ["delegate_permission/common.handle_all_urls"],
|
||||
"target" => [
|
||||
"namespace" => "android_app",
|
||||
"package_name" => "oss.OpenVK.Native",
|
||||
"sha256_cert_fingerprints" => [
|
||||
"79:67:14:23:DC:6E:FA:49:64:1F:F1:81:0E:B0:A3:AE:6E:88:AB:0D:CF:BC:02:96:F3:6D:76:6B:82:94:D6:9C"
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
echo json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
public function renderDev(): void
|
||||
{
|
||||
$this->redirect("https://docs.ovk.to/");
|
||||
|
|
|
@ -407,6 +407,8 @@ routes:
|
|||
handler: "About->robotsTxt"
|
||||
- url: "/humans.txt"
|
||||
handler: "About->humansTxt"
|
||||
- url: "/.well-known/assetlinks.json"
|
||||
handler: "About->AssetLinksJSON"
|
||||
- url: "/dev"
|
||||
handler: "About->dev"
|
||||
- url: "/iapi/getPhotosFromPost/{num}_{num}"
|
||||
|
|
Loading…
Reference in a new issue