Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

V6 cookies on http #1258

Open
Kamuso opened this issue Jan 4, 2021 · 5 comments
Open

V6 cookies on http #1258

Kamuso opened this issue Jan 4, 2021 · 5 comments

Comments

@Kamuso
Copy link
Contributor

Kamuso commented Jan 4, 2021

With #1252 cookies are now strictly sent over https. Cookies are necessary for logging in, so it's a little questionable to force people hosting a meguca instance to use https but I don't actually care about that, more important is that the default address is http://127.0.0.1 so I can't log in to test account related things which is a pain.
Checking to see which protocol is being used before setting the cookie attributes seems like a good idea. What do you think?

@Kamuso
Copy link
Contributor Author

Kamuso commented Jan 8, 2021

Actually, I think the cookie change was because of all the domain name fuckery on the live instance, so maybe it would be best to have a server option for cross-site cookies.

@bakape
Copy link
Owner

bakape commented Jan 9, 2021

Can't this be solved by reading the host of the request?

@Kamuso
Copy link
Contributor Author

Kamuso commented Jan 10, 2021

You mean to see if it starts with https? Sure but the question is more about what is the best solution. Right now I'm checking if the *http.Request has a non-nil TLS attribute, which should work but I haven't been able to test it with https yet, but should we enable cross-site cookies if they're not needed? Does it matter?

@bakape
Copy link
Owner

bakape commented Jan 11, 2021

TLS will not be set, if you are behind a TLS terminating reverse proxy. Honestly, I am not too knowledgeable about cookies. You and @Chiiruno can decide this one as there are no cookies in v7 and I am focusing on that.

@Kamuso
Copy link
Contributor Author

Kamuso commented Jan 14, 2021

TLS will not be set, if you are behind a TLS terminating reverse proxy.

Oh. Websites are complicated.

there are no cookies in v7

Oh. It doesn't matter too much, then, as long as it works.

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

No branches or pull requests

2 participants