How to make Laravel return a View's “Content-Type” header as “application/javascript”?

前端 未结 6 1292
-上瘾入骨i
-上瘾入骨i 2020-12-14 08:41

I\'m trying to output a dynamic javascript file for inclusion from external websites with the [script src=\"\"] tag. As the view is using the Blade engine, it\'

6条回答
  •  醉梦人生
    2020-12-14 09:21

    This worked for me return Response::view($landing)->header('X-Frame-Options', 'DENY');

提交回复
热议问题