laravel - some laravel route not changing to https
问题描述
There are some my route not going to HTTPS in my Javascript code
loadSettingTable("{{ route('setting.table.data.datatable') }}");
they become like this, so my datatable can't be load because mixed content.
loadSettingTable("http://*****.com/admin/data-setting-table/datatable");
but my css and JS file already become HTTPS. I already give this on my AppServiceProvider and ENV
//AppServiceProvider.php on Boot
if(env('REDIRECT_HTTPS')) {
$url->formatScheme('https');
URL::forceScheme('https');
}
//.ENV
REDIRECT_HTTPS=true
But some of it work fine with this code, why my code with route name not giving https?
loadTableRealCommSumAgent("/agent/commissions-summary-member-ajax");
解决方案
我自己发现了这个错误,但真的不知道为什么这个错误发生在我的生产服务器而不是登台服务器上。我删除 $url->formatScheme('https'); 因为它在生产上给出了一些错误,但并非总是如此,它解决了我的问题。
推荐阅读
- r - 如何为每个站点提取多年来持续存在的物种、丢弃的物种或添加的物种的名称
- java - 如何将 PGProperty 与 HikariDataSource 一起使用?
- flutter - Flutter:如何将 Riverpod 与 SharedPreference 和 List 一起使用
多页变量? - php - 如何在 localhost 上运行 ioncube 编码的 laravel 项目
- download - Artifactory Nuget 存储库是否可以“直接下载云存储”?
- android - 如何将蛇案例转换为 Dart 中的正常句子?
- python - Tkinter 存储选择-变量内的值
- arrays - 在 C 中存储和打印数组
- python - 有没有办法通过flask app安装python包?
- react-native - 执行 doInBackground() 时出错 - Expo Barcode Scanner