Skip to content
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

Refused to set unsafe header "sec-websocket-version" #864

Open
vignestion opened this issue Jan 19, 2017 · 0 comments
Open

Refused to set unsafe header "sec-websocket-version" #864

vignestion opened this issue Jan 19, 2017 · 0 comments

Comments

@vignestion
Copy link

I don't know why this poping up and my whole real time functionality is not working ...
Ok First I got this error websocket not defined I fixed it by setting it global variable And after that i got bunch of errors like this

Loo this screenShot

Error Screen Shot

import express from 'express';

import bodyParser from 'body-parser';

import {Server} from 'http';
import React from 'react';
import {renderToString} from 'react-dom/server';
import {match, RouterContext} from 'react-router';
import routes from '../client/routes';

import Helmet from 'react-helmet';
import compression from 'compression';
import favicon from 'serve-favicon';

import {createStore} from 'redux';
import {Provider} from 'react-redux';
import reducer from '../client/reducers'
import path from 'path'

import passport from 'passport';
import config from './Auth';
import r from 'rethinkdb';
import uuid from 'node-uuid';
import Jimp from 'jimp';
import AWS from 'aws-sdk';
const JWTPASS = 'NONOE';
import horizon from '@horizon/server'
let cookieParser = require('cookie-parser');
import jwt from 'jsonwebtoken';
import {forEachOf} from 'async';
import _ from 'underscore';
import xssFilters from 'xss-filters'

const FacebookStrategy = require('passport-facebook').Strategy;
const TwitterStrategy = require('passport-twitter').Strategy;
let session = require('express-session');

AWS.config.loadFromPath('src/server/c.json');
let s3 = new AWS.S3();

let app = express();

app.use(compression())
app.use(bodyParser.json({limit:"15mb"}));
app.use(express.static('public'));
app.use(cookieParser('keyboardcat'));

app.use(session({
secret: 'keyboardcat',
resave: true,
saveUninitialized: true,

}));
app.use(passport.initialize());

app.use(passport.session());

......
///Api
.......

const PORT = 8000;

const server = app.listen(PORT,() => {
console.log('Express Server Running')
});

const horizon_options = {
project_name: 'image',
permissions: false,

auth: {
    token_secret:  'jJ99999999911111111222222222222^%!',
    allow_anonymous: true,
    allow_unauthenticated: true,

}

};

const horizon_server = horizon(server, horizon_options);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant