问题
I have set up a virtual machine(eg., ckan.test.com) and set up CKAN on that machine. Every thing looks fine until i try to submit any form. If i try to submit any form it will automatically redirect to localhost:5000.
Ex: Login page is http://ckan.test.com/user/login. Once i enter credentials and login its redirecting to http://localhost:5000/user/logged_in. If i replace localhost:5000 with ckan.test.com it takes me to the correct home page.
Can any one tell me whats going on
回答1:
CKAN form submissions now have absolute redirect links - i.e. including the host name. The only way that CKAN knows what host it is deployed to is what you put in your ckan config. So in your ckan config (ini) file change the option to:
ckan.site_url = http://ckan.test.com
instead of http://127.0.0.1:5000
.
来源:https://stackoverflow.com/questions/44579033/ckan-always-redirecting-to-localhost5000