Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting cross origin problems. #41

Open
metin opened this issue Nov 9, 2016 · 0 comments
Open

Getting cross origin problems. #41

metin opened this issue Nov 9, 2016 · 0 comments

Comments

@metin
Copy link

metin commented Nov 9, 2016

Hi,
I had to modify port numbers for my purposes. This is my setup.sh file. I had to run taiga-front on 8081.

#! /usr/bin/env bash

API_NAME="softtech.gitlab";

echo API_NAME: $API_NAME

mkdir -p /data/postgres

#docker pull ipedrazas/taiga-back
#docker pull ipedrazas/taiga-front


docker run -d --name postgres2  -v /data/postgres:/var/lib/postgresql/data postgres
# postgres needs some time to startup
sleep 5
docker run -d --name taiga-back  -p 8000:8000 -e API_NAME=$API_NAME  --link postgres2:postgres ipedrazas/taiga-back
docker run -d --name taiga-front -p 8081:80 -e API_NAME=$API_NAME --link taiga-back:taiga-back --volumes-from taiga-back ipedrazas/taiga-front

docker run -it --link postgres2:postgres --rm postgres sh -c "su postgres --command 'createuser -h "'$POSTGRES_PORT_5432_TCP_ADDR'" -p "'$POSTGRES_PORT_5432_TCP_PORT'" -d -r -s taiga'"
docker run -it --link postgres2:postgres --rm postgres sh -c "su postgres --command 'createdb -h "'$POSTGRES_PORT_5432_TCP_ADDR'" -p "'$POSTGRES_PORT_5432_TCP_PORT'" -O taiga taiga'";
docker run -it --rm --link postgres2:postgres ipedrazas/taiga-back bash regenerate.sh

Setup runs successfully but when I load the page I get errors. This is not too important I guess. Here is the chrome log.

Initialize navigation urls
Initialize api urls
Using the default logging exception handler.
Initialize resources
Initialize application
Analytics: no acount id provided. Disabling.
TypeError: Cannot read property 'get' of null
    at link (http://gitlab.softtech:8081/js/app.js?v=1437417084614:23656:44)
    at http://gitlab.softtech:8081/js/libs.js?v=1437417084604:13:9603
    at invokeLinkFn (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:13:9721)
    at nodeLinkFn (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:12:27886)
    at http://gitlab.softtech:8081/js/libs.js?v=1437417084604:13:5035
    at processQueue (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:14:24061)
    at http://gitlab.softtech:8081/js/libs.js?v=1437417084604:14:24328
    at Scope.$eval (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:15:5292)
    at Scope.$digest (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:15:3032)
    at Scope.$apply (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:15:5697)
    at http://gitlab.softtech:8081/js/libs.js?v=1437417084604:14:30625
    at completeOutstandingRequest (http://gitlab.softtech:8081/js/libs.js?v=1437417084604:12:5843)
    at http://gitlab.softtech:8081/js/libs.js?v=1437417084604:12:8857 <div tg-working-on="">

Then when I go to signup page to create an account, I get this when signing up.

OPTIONS http://softtech.gitlab:8000/api/v1/auth/register 
XMLHttpRequest cannot load http://softtech.gitlab:8000/api/v1/auth/register. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://gitlab.softtech:8081' is therefore not allowed access. The response had HTTP status code 504.
XHR failed loading: POST "http://softtech.gitlab:8000/api/v1/auth/register".
TypeError: Cannot read property '_error_message' of null
    at onErrorSubmit (auth.coffee:274)
    at processQueue (angular.js:14454)
    at angular.js:14470
    at Scope.$eval (angular.js:15719)
    at Scope.$digest (angular.js:15530)
    at Scope.$apply (angular.js:15824)
    at angular.js:16119
    at completeOutstandingRequest (angular.js:5370)
    at angular.js:5642

Any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant