问题描述
我正在为我大学的身份验证系统 (Ucam_Webauth) 使用图书馆,这意味着我必须通过其中一种方法重定向到身份验证服务器.不幸的是,由于该库的体系结构,我无法返回 Redirect:to().该库本身使用 header('Location: ...'); 但这由于某种原因不起作用.
I'm working with a Library for my university's authentication system (Ucam_Webauth) which means I have to redirect to the authentication server in one of the methods. Unfortunately, I cannot return a Redirect:to() because of the architecture of this library. The library itself uses header('Location: ...'); but this isn't working for some reason.
如果我在发送标头后使程序 die(); 可以工作,否则就不行.
If I make the programme die(); after sending the header it works, but otherwise it doesn't.
知道如何解决这个问题吗?
Any idea how I can fix this?
推荐答案
return redirect()->to('url')->send();
发送 HTTP 标头和内容.在我的应用程序中,send() 方法的作用类似于 'exit()' 并且是可测试的
Sends HTTP headers and content. In my application, send() method acts like 'exit()' and is testable
这篇关于Laravel 中的位置标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)