This is a patch for Akto API Security that resolves the "Access Restricted" and "Dashboard Expired" errors in the community edition.
The patch works by system-wide redirection of the CloudFront JS asset to a locally modified version.
Ensure the following files are in /Users/mac/Desktop/fix:
main.js- Your modified JS file.patch_server.py- The Python HTTPS server.generate_cert.sh- SSL certificate generation script.
Browsers require HTTPS for JS assets. We need to create a trusted certificate for the CloudFront domain.
- Open Terminal and navigate to the directory:
cd aktofix - Make the script executable and run it:
chmod +x generate_cert.sh ./generate_cert.sh
- Add the certificate to the system keychain (password required):
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain server.crt
Redirect d1hvi6xs55woen.cloudfront.net to your local machine.
- Open
/etc/hosts:sudo nano /etc/hosts
- Add this line at the end:
127.0.0.1 d1hvi6xs55woen.cloudfront.net - Save (Ctrl+O, Enter) and Exit (Ctrl+X).
Start the Python server to serve the modified file:
sudo python3 patch_server.py(sudo is required for port 443).
Note: The server automatically detects the latest version from GitHub and intercepts any version path.
Этот патч для Akto API Security убирает ошибки "Access Restricted" и "Dashboard Expired" в комьюнити-версии.
Патч работает через системное перенаправление запроса к JS-файлу на CloudFront на локальную модифицированную версию.
Убедитесь, что в папке /Users/mac/Desktop/fix находятся:
main.js— модифицированный JS-файл.patch_server.py— Python HTTPS сервер.generate_cert.sh— скрипт генерации SSL-сертификатов.
- Перейдите в папку в терминале:
cd aktofix - Запустите генерацию:
chmod +x generate_cert.sh ./generate_cert.sh
- Добавьте сертификат в систему:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain server.crt
- Откройте файл:
sudo nano /etc/hosts
- Добавьте строку:
127.0.0.1 d1hvi6xs55woen.cloudfront.net
sudo python3 patch_server.py(Сервер автоматически подхватывает актуальные версии Akto через GitHub API).