akveo / akveo/ngx-admin-bundle-support
CORS - SSL Issues and Implementation
- 主要言語
- TypeScript
- スター
- 56
- フォーク
- 30
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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...
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。