Comments (5)
I have this same issue. nickelser: Can you be more specific as to how you got around this?
from pusher-js.
make sure you are including the csrf_meta_tags helper in your view, run the Pusher.csrf_token = $... code in some global init block, and then run setrequestheader in the ajaxsetup call.
in coffeescript, I have a function like this:
init_csrf = ->
window._settings.token = $('meta[name="csrf-token"]').attr 'content'
$.ajaxSetup
beforeSend: (xhr) ->
xhr.setRequestHeader "X-CSRF-Token", _settings.token
from pusher-js.
This isn't actually yet done, I'm working on a patch this week which should be released in the next couple of weeks.
from pusher-js.
I'm having this problem as well, and it's been a while - Any progress on this?
from pusher-js.
It's possible to pass additional parameters to be passed along with channel_name
and socket_id
by passing additional options to the Pusher
constructor. This provides a way of defining additional query parameters and headers.
You can read the documentation here:
http://pusher.com/docs/client_api_guide/client_connect#options_parameter
from pusher-js.
Related Issues (20)
- TypeError: Object(...) is not a function at Object.randomInt HOT 10
- PWA HOT 1
- Constant connection state changes when using other than ws transports HOT 3
- Not actuall stats HOT 6
- Pusher-JS doesnt play well with NextJS 14 : Uncaught SyntaxError: Unexpected token ':' HOT 2
- Providing Custom Handler, Internal Endpoint Still Calls
- Pusher client is not binding correctly on presence channels but on public ones yes HOT 2
- Pusher websocket URL triggering events and sending data HOT 1
- This is a test.
- testing
- PageSpeed Insights Failed: net::ERR_NAME_NOT_RESOLVED HOT 1
- Feature - Attach additional params in `subscribe` method for channel auth
- test123
- test bracatinga
- test samambaia
- test araucaria
- test pinus grandis
- test hortencia
- test hoverboat
- await pusher.get() returning unresolved promise
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pusher-js.