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

Q & A (Updating...) #4442

Closed
flycash opened this issue Jan 18, 2021 · 6 comments
Closed

Q & A (Updating...) #4442

flycash opened this issue Jan 18, 2021 · 6 comments

Comments

@flycash
Copy link
Collaborator

flycash commented Jan 18, 2021

Do not leave comment here. If you are confused about some questions, please make a new issue.

@flycash flycash pinned this issue Jan 18, 2021
@flycash
Copy link
Collaborator Author

flycash commented Jan 18, 2021

Q: XSRF didn't work. #4369

A: From Beego v1.12.3, we set two more flags for XSRF cookie, secure and http-only. secure means that it only works for HTTPS protocol. http-only means that you could not read XSRF token in frontend.

We suggest that disable XSRF when you are developing and enable it in production environment.

The key point is why we add these two flags?

Because it's not safe if missing these two flags. Someone told us that they were attacked. :(

@jianzhiyao jianzhiyao unpinned this issue Jan 19, 2021
@jianzhiyao jianzhiyao pinned this issue Jan 19, 2021
@flycash
Copy link
Collaborator Author

flycash commented Jan 19, 2021

Q: Could I use zipkin, jeaguar or other tracing framework?

A: In Beego v2.x, we build full-chain tracing by using opentracing API. It means that you could use any framework that support opentracing API. Zipkin, jeaguar and skywalking support opentracing API. What you need to do is inject the Tracer instance to opentracing. Please check those frameworks' official doc to learn how to use opentracing API.

@flycash
Copy link
Collaborator Author

flycash commented Mar 4, 2021

Q: How to resolve problem Can not find pakage "github.com/beego/beego/v2"
A: Usually it means that you use GOPATH. Now Beego requires GO MOD, which requires you must set GO111MODULE=on in your environment.
try to run:

export GO111MODULE=on
go get -u github.com/beego/beego/v2@master

#4497 #4421

@flycash
Copy link
Collaborator Author

flycash commented Mar 4, 2021

Q: Why running go get github.com/beego/beego/v2 always get timeout exception, the message is "dial tcp 172.x.x.x i/o timeout" ??
A: When you got this error, you could set GORPOXY. In general, if you are in China, you could run

export GOPROXY=https://goproxy.cn

Then try again!

@flycash
Copy link
Collaborator Author

flycash commented Oct 18, 2021

Q: Could not query INFORMATION_SCHEMA for PK/UK/FK information?
A: Please confirm that you are using mysql8.x. It's due to mysql8.x changes its default_authentication_plugin, so Beego could not fetch the schema. Uses this ALTER USER 'userName'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; flush privileges;
You can find the solution here beego/bee#540
And here is the mysql docs https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin

@beego beego deleted a comment from github-actions bot Mar 5, 2022
@flycash flycash reopened this Mar 5, 2022
@beego beego deleted a comment from github-actions bot Mar 5, 2022
@sheep-yang
Copy link

check you go.mod file, add require github.com/beego/beego v2

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

No branches or pull requests

2 participants