- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我可以使用 HTTPS 设置在本地环境中运行 laravel-echo-server 就好了。但是,我的生产服务器(基于 Forge)似乎存在问题:
Client cannot be authenticated, got HTTP status 405
Broadcast::channel('App.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});
Broadcast::channel('channelReceiveLiveData.{id}', function ($user, $id) {
return true;
});
Broadcast::channel('channelReceiveTestState.{id}', function ($id) {
return true;
});
Echo.private('channelReceiveLiveData.' + this.$route.params.testID)
.listen('liveDataTrigger', (e) => {
if (!that.state.hasPulledInitialData) {
console.log('Receiving data before initial pull done');
}
"authHost": "https://app.test.com",
"authEndpoint": "/broadcasting/auth",
"clients": [
{
"appId": "....",
"key": "...."
}
],
"database": "redis",
"databaseConfig": {
"redis": {},
"sqlite": {
"databasePath": "/database/laravel-echo-server.sqlite"
}
},
"devMode": false,
"host": null,
"port": "6001",
"protocol": "https",
"socketio": {},
"sslCertPath": "/etc/nginx/ssl/app.test.com/ssl/server.crt",
"sslKeyPath": "/etc/nginx/ssl/app.test.com/ssl/server.key",
"sslCertChainPath": "",
"sslPassphrase": "",
"apiOriginAllow": {
"allowCors": false,
"allowOrigin": "",
"allowMethods": "",
"allowHeaders": ""
}
}
Client can not be authenticated, got HTTP status 405
socket.io-parser encoding packet {"type":2,"data":["subscription_error","private-channelReceiveTestState.asdf23f",405],"nsp":"/"} +234ms
socket.io-parser encoded {"type":2,"data":["subscription_error","private-channelReceiveTestState.asdf23f",405],"nsp":"/"} as 2["subscription_error","private-channelReceiveTestState.asdf23f",405] +1ms
socket.io:client writing packet ["2[\"subscription_error\",\"private-channelReceiveTestState.asdf23f\",405]"] +356ms
engine:socket sending packet "message" (2["subscription_error","private-channelReceiveTestState.asdf23f",405]) +237ms
engine:socket flushing buffer to transport +0ms
engine:polling writing "70:42["subscription_error","private-channelReceiveTestState.asdf23f",405]" +187ms
engine upgrading existing transport +221ms
engine:socket might upgrade socket transport from "polling" to "websocket" +36ms
engine intercepting request for path "/socket.io/" +25ms
engine handling "GET" http request "/socket.io/?EIO=3&transport=polling&t=MGQq611&sid=6gfNSDGZdH3lXQwZAAAA" +0ms
engine setting new request for existing client +1ms
engine:polling setting request +60ms
engine:socket executing batch send callback +25ms
engine:ws received "2probe" +0ms
engine:ws writing "3probe" +1ms
engine:socket writing a noop packet to polling for fast upgrade +129ms
engine:polling writing "1:6" +129ms
engine:ws received "5" +152ms
engine:socket got upgrade packet - upgrading +50ms
engine:polling closing +51ms
engine:polling transport discarded - closing right away +0ms
engine intercepting request for path "/socket.io/" +838ms
engine handling "GET" http request "/socket.io/?EIO=3&transport=polling&t=MGQq6E8" +1ms
engine handshaking client "_glN99nDAdsKhhZBAAAB" +2ms
engine:socket sending packet "open" ({"sid":"_glN99nDAdsKhhZBAAAB","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}) +663ms
engine:socket sending packet "message" (0) +3ms
engine:polling setting request +666ms
engine:socket flushing buffer to transport +1ms
engine:polling writing "96:0{"sid":"_glN99nDAdsKhhZBAAAB","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}2:40" +0ms
engine:socket executing batch send callback +1ms
socket.io:server incoming connection with id _glN99nDAdsKhhZBAAAB +1s
socket.io:client connecting to namespace / +910ms
socket.io:namespace adding socket to nsp / +1s
socket.io:socket socket connected - writing packet +1s
socket.io:socket joining room _glN99nDAdsKhhZBAAAB +0ms
socket.io:socket packet already sent in initial handshake +1ms
socket.io:socket joined room _glN99nDAdsKhhZBAAAB +0ms
engine intercepting request for path "/socket.io/" +65ms
engine handling "POST" http request "/socket.io/?EIO=3&transport=polling&t=MGQq6FB&sid=_glN99nDAdsKhhZBAAAB" +1ms
engine setting new request for existing client +0ms
engine:polling received "133:42["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]" +62ms
engine:socket packet +62ms
socket.io-parser decoded 2["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] as {"type":2,"nsp":"/","data":["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]} +971ms
socket.io:socket got packet {"type":2,"nsp":"/","data":["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]} +59ms
socket.io:socket emitting event ["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] +0ms
socket.io:socket dispatching an event ["subscribe",{"channel":"channelReceiveLiveData.3","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] +1ms
socket.io:socket joining room channelReceiveLiveData.3 +0ms
socket.io:socket joined room channelReceiveLiveData.3 +0ms
engine intercepting request for path "/socket.io/" +5ms
engine handling "GET" http request "/socket.io/?EIO=3&transport=polling&t=MGQq6FD&sid=_glN99nDAdsKhhZBAAAB" +0ms
engine setting new request for existing client +0ms
engine:polling setting request +5ms
engine upgrading existing transport +118ms
engine:socket might upgrade socket transport from "polling" to "websocket" +122ms
engine:ws received "2probe" +900ms
engine:ws writing "3probe" +1ms
engine:socket writing a noop packet to polling for fast upgrade +149ms
engine:polling writing "1:6" +268ms
engine:ws received "5" +150ms
engine:socket got upgrade packet - upgrading +50ms
engine:polling closing +49ms
engine:polling transport discarded - closing right away +1ms
socket.io:client client close with reason transport close +10s
socket.io:socket closing socket - reason transport close +10s
engine intercepting request for path "/socket.io/" +10s
engine handling "GET" http request "/socket.io/?EIO=3&transport=polling&t=MGQq8qd" +1ms
engine handshaking client "rbDPCyhJNywypMPLAAAC" +0ms
engine:socket sending packet "open" ({"sid":"rbDPCyhJNywypMPLAAAC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}) +10s
engine:socket sending packet "message" (0) +0ms
engine:polling setting request +10s
engine:socket flushing buffer to transport +1ms
engine:polling writing "96:0{"sid":"rbDPCyhJNywypMPLAAAC","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}2:40" +1ms
engine:socket executing batch send callback +0ms
socket.io:server incoming connection with id rbDPCyhJNywypMPLAAAC +11s
socket.io:client connecting to namespace / +584ms
socket.io:namespace adding socket to nsp / +11s
socket.io:socket socket connected - writing packet +585ms
socket.io:socket joining room rbDPCyhJNywypMPLAAAC +0ms
socket.io:socket packet already sent in initial handshake +1ms
socket.io:socket joined room rbDPCyhJNywypMPLAAAC +0ms
engine intercepting request for path "/socket.io/" +96ms
engine handling "GET" http request "/socket.io/?EIO=3&transport=polling&t=MGQq8s8&sid=rbDPCyhJNywypMPLAAAC" +0ms
engine setting new request for existing client +7ms
engine:polling setting request +101ms
engine intercepting request for path "/socket.io/" +19ms
engine handling "POST" http request "/socket.io/?EIO=3&transport=polling&t=MGQq8sY&sid=rbDPCyhJNywypMPLAAAC" +0ms
engine setting new request for existing client +0ms
engine:polling received "148:42["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]" +20ms
engine:socket packet +121ms
socket.io-parser decoded 2["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] as {"type":2,"nsp":"/","data":["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]} +11s
socket.io:socket got packet {"type":2,"nsp":"/","data":["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}]} +118ms
socket.io:socket emitting event ["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] +1ms
socket.io:socket dispatching an event ["subscribe",{"channel":"private-channelReceiveTestState.asdf23f","auth":{"headers":{"X-CSRF-TOKEN":"6qYUDXsZb7dKnqjOfOdmucoCw9bHi5OiqMIVQoRt"}}}] +0ms
最佳答案
我遇到过同样的问题。我在 laravel-echo-server.json 配置文件中更新了我的 authEndpoint 变量。"authEndpoint": "/api/broadcasting/auth",
当我在我的项目中列出路线时,我看到了这一行。
| | GET|POST|HEAD | api/broadcasting/auth | | Illuminate\Broadcasting\BroadcastController@authenticate | auth:api |
并对其进行身份验证。
| | GET|POST|HEAD | broadcasting/auth | | Illuminate\Broadcasting\BroadcastController@authenticate | web |
附言我将 Laravel Passport 与 Laravel Echo 服务器一起使用
关于Laravel 回声 'Client can not be authenticated, got HTTP status 405',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50869536/
我对文档有点困惑。请纠正我。 git 状态- 显示当前本地工作目录状态 git status -u- 显示未跟踪的文件(也是本地的) git 状态 -uno- 不显示未跟踪的文件(也是本地的)?? 后
我有一个具有 12 个虚拟机资源的 ARM 模板。每个虚拟机都有 1 个与其关联的 CustomLinuxScript 扩展资源。 某些 CustomLinuxScript 扩展失败并出现错误:状态文
我有一个具有 12 个虚拟机资源的 ARM 模板。每个虚拟机都有 1 个与其关联的 CustomLinuxScript 扩展资源。 某些 CustomLinuxScript 扩展失败并出现错误:状态文
我有以下 JavaScript 代码: alert(data.status); data 是一个 JSON 对象,其字段之一是 status ( bool 字段)。 当JSON.stringify(d
我在验证表单时遇到此错误,如何解决它。 代码: app.post('/',[ check('username','Error occured in Username').trim().isEmai
我正在开发一个使用 fork() exec() wait() 的 C 程序。第一个进程有以下代码: int main(int argc, const char * argv[]) { // inser
我想在 git status 上运行 linter,但是似乎没有 pre-status 和 post-status Hook 。 如何给 git 添加一个钩子(Hook)? fine docs对此事保
我需要获取所有 current_user.friends 状态,然后按 created_at 对它们进行排序。 class User a.created_at } end current_user.
我在 Eloquent 中使用 orWhere 时遇到问题。 我有一个团队,这个团队有一些资料。我想获取状态 = 1 或状态 = 2 的所有配置文件。但我无法让它工作。 我的代码是这样的: $prof
http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT 根据这
我们在 IIS 6.0 上托管 WCF 服务的服务器之一上观察到以下行为: IIS 日志显示所用时间的值较高 (> 100000) HTTP 状态码是 200 sc-win32-status 代码显示
在 Dynamics CRM 中,潜在客户实体同时具有状态和状态原因。使用 API 我可以获得所有状态原因。我被绊倒的地方是当我的用户选择状态原因时我想倒退并找出哪个状态与所选状态原因相关联。 以下是
我很好奇返回响应和仅创建响应的区别。 我见过大量使用 return res.status(xxx).json(x) 的代码示例和res.status(xxx).json(x) . 谁能详细解释一下两者
文档并没有真正说明 status 是什么。 status 到底是什么? http://man7.org/linux/man-pages/man2/exit_group.2.html 最佳答案 来自ex
An earlier question导致了一些关于如何检查 Git 存储库是否包含脏索引或未跟踪文件的想法。我从那次讨论中采纳的答案如下: #!/bin/sh exit $(git status -
ECSHOP出现 XMlHttpRequest status:[500] Unknow status 这个错误 把/admin/templates/top.htm 这个文件中{insert_scr
我有以下代码用于通过 Twitter4J 获取推文: List statuses; Paging paging = new Paging(1, LIMIT); statuses = twitter.g
非常不言自明。我正在制作一个脚本并且遇到了被使用和解析的情况,但它们的输出似乎总是完全相同。 最佳答案 git status --branch --porcelain "显示分支的状态(ahead,
我有一张表,上面有如下记录 表A subid clickid status datetime 1 123 low 2018-07-24 20:20:44 2 123
如果确实缺少资源,我的 API 将返回以下内容 { "code": 404, "message": "HTTP 404 Not Found" } 当我使用代码 Response.sta
我是一名优秀的程序员,十分优秀!