Mixed Content error on all API/datagrid routes with HTTPS #2393
Replies: 2 comments
-
|
Hello, I've found a critical bug in Krayin v2.1. The application generates This happens regardless of the APP_DEBUG setting ( We have already tried all standard Laravel fixes:
The bug seems to be in Krayin's internal asset URL generation, which completely ignores the standard Laravel HTTPS configuration. |
Beta Was this translation helpful? Give feedback.
-
|
Could you please confirm if you're accessing the application through Ngrok? This often causes HTTPS detection issues and leads to mixed-content errors. In the meantime, you can fix the issue by adding the following code inside if (
(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1))
|| (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
) {
$this->app['request']->server->set('HTTPS', true);
}This forces Laravel to properly detect HTTPS when running behind Ngrok or a proxy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I've found a bug in Krayin v2.1. The application generates mixed content (http) URLs for all its datagrid API calls (Dashboard, Users list, Groups list, etc.), causing the pages to get stuck in a loading state.
This happens even after confirming the following fixes:
The bug seems to be in the URL generation for API/datagrid routes, which does not respect the application's HTTPS configuration.
Beta Was this translation helpful? Give feedback.
All reactions