akveo / akveo/ngx-admin-bundle-support
CORS - SSL Issues and Implementation
- Lingua principale
- TypeScript
- Stelle
- 56
- Fork
- 30
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Good evening.
We are currently trying to setup everything so that the backend and frontend are not on the same network and so processes the request over HTTPS, however we are having issues trying to implement SSL on the backend.
site: https://enixlabs.uk
api: https://enua.me <---- Https isn't working
**We've tried various options.**
```
const https = require('https') <-- Added code for https
const fs = require('fs') <-- Added certs
```
`polyfills-es2015.8df41bc2e30885896a47.js:1 Mixed Content: The page at 'https://enixlabs.uk/auth/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://enua.me:3001/api/auth/login'. This request has been blocked; the content must be served over HTTPS.`
`polyfills-es2015.8df41bc2e30885896a47.js:1 POST https://[PUBLICIP]:3001/api/auth/login net::ERR_SSL_PROTOCOL_ERROR`
`polyfills-es2015.8df41bc2e30885896a47.js:1 POST https://enua.me:3001/api/auth/login net::ERR_SSL_PROTOCOL_ERROR`
Are we missing something when it comes to adding SSL, as nothing seems to work.
We also had to update the app.js for CORS
```
app.all('/', (req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'X-Requested-With');
next();
});
```
As it wasn't passing the CORS request for authentication, fixed that problem with the above...
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.