Replies: 4 comments
|
I have the same problem |
0 replies
|
Add this to your settings.py
USE_X_FORWARDED_HOST = True
El El sáb, 16 may. 2020 a la(s) 17:11, Bastilla123 <notifications@github.com>
escribió:
I have the same problem
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1093>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQK5U5E7LLHIHN67IK5NJTRR3XNRANCNFSM4NBU6YYQ>
.
--
Enviado con Gmail Mobile
|
0 replies
|
I have the same problem i used node.js , http-proxy-middleware i can't custom HOST in redirect_uri |
0 replies
|
this url maybe help to you python-social-auth/social-app-django#31 (comment) my way:i used node.js , http-proxy-middleware i change my Proxy setting, it's works in my project here is my code : old code, can't work,i got a error : /* eslint-disable no-console */
const express = require('express');
const next = require('next');
const devProxy = {
'/api': {
target: 'http://0.0.0.0:8000/',
changeOrigin: true,
},
};
const port = parseInt(process.env.PORT, 10) || 3000;
const env = process.env.NODE_ENV;
const dev = env !== 'production';
const app = next({
dir: '.', // base directory where everything is, could move to src later
dev,
});
const handle = app.getRequestHandler();
let server;
app
.prepare()
.then(() => {
server = express();
// Set up the proxy.
if (dev && devProxy) {
const {createProxyMiddleware} = require('http-proxy-middleware');
Object.keys(devProxy).forEach(function (context) {
server.use(createProxyMiddleware(context, devProxy[context]));
});
}
server.all('*', (req, res) => {
handle(req, res);
});
server.listen(port, err => {
if (err) {
throw err;
}
console.log(`> Ready on port ${port} [${env}]`);
});
})
.catch(err => {
console.log('An error occurred, unable to start the server');
console.log(err);
});new code, it's works for me/* eslint-disable no-console */
const express = require('express');
const next = require('next');
const devProxy = {
'/api': {
target: 'http://0.0.0.0:8000/',
changeOrigin: true,
headers: {
Host: 'mydomain.com',
Origin: 'mydomain.com'
},
},
};
const port = parseInt(process.env.PORT, 10) || 3000;
const env = process.env.NODE_ENV;
const dev = env !== 'production';
const app = next({
dir: '.', // base directory where everything is, could move to src later
dev,
});
const handle = app.getRequestHandler();
let server;
app
.prepare()
.then(() => {
server = express();
// Set up the proxy.
if (dev && devProxy) {
const {createProxyMiddleware} = require('http-proxy-middleware');
Object.keys(devProxy).forEach(function (context) {
server.use(createProxyMiddleware(context, devProxy[context]));
});
}
server.all('*', (req, res) => {
handle(req, res);
});
server.listen(port, err => {
if (err) {
throw err;
}
console.log(`> Ready on port ${port} [${env}]`);
});
})
.catch(err => {
console.log('An error occurred, unable to start the server');
console.log(err);
});what i dojust add headers: {
Host: 'mydomain.com',
Origin: 'mydomain.com'
}, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Iḿ having an issue with a django / facebook login. When redirected to facebook I noticed that the redirect URL is set as follow:
redirect_uri=https://127.0.0.1:8001/social-auth/complete/facebook/&state=LppYImgn2B4X53ZpWunR7M3mIR6E4Rvh&return_scopes=true&scope=email
facebook complains and says the URL is not valid. Iḿ not sure where this URL comes from.
All reactions