Refactor VK service URLs to use 'vk.ru' instead of 'vk.com' for consistency; update CORS configuration to allow additional methods and origins, enhancing API security and flexibility.

This commit is contained in:
F4ilji
2025-09-05 23:42:06 +05:00
parent 2a5df7bc59
commit 525c9edc65
6 changed files with 29 additions and 33 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ class VkWallService
];
try {
$response = Http::asForm()->post('https://api.vk.com/method/wall.post', $params);
$response = Http::asForm()->post('https://api.vk.ru/method/wall.post', $params);
if ($response->successful() && isset($response['response'])) {
return [
@@ -122,7 +122,7 @@ class VkWallService
];
try {
$response = Http::asForm()->post('https://api.vk.com/method/wall.delete', $params);
$response = Http::asForm()->post('https://api.vk.ru/method/wall.delete', $params);
if ($response->successful() && isset($response['response']) && $response['response'] == 1) {
return [