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

Cookies are not set #17

Open
davtur19 opened this issue Dec 11, 2019 · 10 comments
Open

Cookies are not set #17

davtur19 opened this issue Dec 11, 2019 · 10 comments

Comments

@davtur19
Copy link
Contributor

davtur19 commented Dec 11, 2019

In the previous version cookies were set, after updating they are no longer set, and therefore I can no longer log on to the vorum that I am hosting
In the console no errors appear and the variables seem correct (I did some small tests printing them in console)

@medvednikov
Copy link
Member

Secure cookies are used now, need to detect dev environment, and not use them there. Will fix today.

@davtur19
Copy link
Contributor Author

I recompiled v removing "secure" from the cookie header and now cookies are set
However, it's like I'm not logged in anyway

Now I try to put vorum behind a nginx proxy to see if anything changes

@davtur19
Copy link
Contributor Author

After having reset the db and with the cookies working, this appears in the console:
user not found (id = 1, random_id = HArizBDdk29f3S0A99tD)
I checked the database and the values are correct

@medvednikov
Copy link
Member

@davtur19 sorry for the delay, should be fine now..

Can you try again?

@davtur19
Copy link
Contributor Author

Same problem
I tried this:

./v up
cd ../vorum/
../v/v .
# reset database
psql -f init_postgres_db.sql -d vorum
git pull
./vorum

@medvednikov
Copy link
Member

I assume you set the cookie with a browser extension, or with the developer's console, right?

@davtur19
Copy link
Contributor Author

I reset them with the console (firefox developer edition)

@davtur19
Copy link
Contributor Author

I tried also on chrome, with incognito mode

@davtur19
Copy link
Contributor Author

After having reset the db and with the cookies working, this appears in the console:
user not found (id = 1, random_id = HArizBDdk29f3S0A99tD)
I checked the database and the values are correct

I was referring to this problem in the previous comments, cookies work properly using nginx as a proxy

Without proxy (http):
it still doesn't work (even in other browsers and incognito mode)
image

@medvednikov
Copy link
Member

Very strange, works fine for me locally (no proxy), and on forum.vlang.io (nginx).

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

2 participants