我使用laravel 5.7,在本地运行良好,但是将应用程序部署到生产服务器(heroku)后,CSS和JS似乎无法正常工作。我该怎么办?
此网址为“ https://arrahnu-demo.herokuapp.com/
<head>
<meta charset="utf-8">
<title>Arrahnu Gadai Indonesia</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="" name="keywords">
<meta content="" name="description">
<!-- Favicons -->
<link href="{{asset('/img/favicon.png')}}" rel="icon">
<link href="{{asset('/img/apple-touch-icon.png')}}" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">
<!-- Bootstrap CSS File -->
<link href="{{asset('/lib/bootstrap/css/bootstrap.css')}}" rel="stylesheet">
<!-- Libraries CSS Files -->
<link href="{{asset('/lib/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
<link href="{{asset('/lib/animate/animate.min.css')}}" rel="stylesheet">
<link href="{{asset('/lib/ionicons/css/ionicons.min.css')}}" rel="stylesheet">
<link href="{{asset('/lib/owlcarousel/assets/owl.carousel.min.css')}}" rel="stylesheet">
<link href="{{asset('/lib/magnific-popup/magnific-popup.css')}}" rel="stylesheet">
<link href="{{asset('/lib/ionicons/css/ionicons.min.css')}}" rel="stylesh">
<!-- Main Stylesheet File -->
<link href="{{asset('/css/style.css')}}" rel="stylesheet">
</head>
答案 0 :(得分:2)
您的<link>
正在获取http而不是https。
随着您在Heroku上的网站通过https服务,浏览器将阻止混合内容。