-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 when connecting through js websocket. Works when testing with Postman #475
Comments
Just a guess but have you tried setting |
@JPTomorrow not having seen any of the server code, I can only suggest you try with proper CORS handling, e.g. via https://github.com/rs/cors or https://github.com/go-chi/cors. Other than that I don’t think there’s a whole lot I can do to help. The issue seems to either be a misbehaving client or misconfigured server. Or perhaps you’re opening a local |
Oh and in case you hadn't already, do have a look at these options too: Lines 30 to 52 in 3dd723a
|
I had this same issue. Setting |
I am having an issue where it client browsers throw a 403 forbidden error when trying to connect.
Client Side Code:
`
import { FormEvent, useCallback, useEffect, useState } from "react";
import useWebSocket, { ReadyState } from "react-use-websocket";
import "./App.css";
type Message = {
id: number;
name: string;
msg: string;
};
function App() {
const [isCustomer, setIsCustomer] = useState(false);
const [isSelected, seIsSelected] = useState(false);
const myCustomerId = 12121212;
const mySupportRepId = 42424242;
}
export default App;
`
The text was updated successfully, but these errors were encountered: