简体   繁体   中英

Getting over a 426 upgrade required

I've been working on a web app (front Angular, back Node/Express/Mongo) for a few months now.

I run Angular on localhost:4200 and Node on localhost:3000

Some people in our team are running the backend in a VM that runs on their computers.

So that the app works in both cases we've edited the windows hosts file to make the app point to the correct place (either the VM or the back on the local machine)

127.0.0.1 mysite

Developers using the VM changed 127.0.0.1 with their VM's IP.

Everything worked smoothly.

A few days ago, our company installed bitlocker on every PC and I believe it caused our setup to break for everyone not using the VM (which is not subject to bitlocker)

People working on localhost started receiving from the front app:

OPTIONS http://mysite:3000/auth/login 426 (Upgrade Required)

The requests are not even hitting the Node server. Looks like they're redirected to a websocket server?

If I change the requests to target localhost:3000 the app works again but we lose the setup for people working on the VM. (thus committing code becomes annoying if we need to change the base url each time)

I could make an environment for each case but it's not clean and I'd like to know why it suddenly broke.

Try changing the port from 3000 to something else.

I just ran into this issue when a coworker tried running an express app we've been building on a Windows machine for the first time, as opposed to an EC2 instance. I've been using a Mac during development.

The issue seemed to be that 0.0.0.0:3000 was already mapped on company Windows machines. If you run netstat -an in a command prompt you may see it in use already.

你好,这通常是由于PC和服务器之间的协议不匹配而发生的。TLS1.0和1.1在2018年6月4日被永久弃用。我怀疑您使用的仍然是旧版本的TLS。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM