Skip to content

Commit

Permalink
Merge pull request #62 from huangyingting/main
Browse files Browse the repository at this point in the history
Fix insecure websocket for store-front and store-admin and remove tls requirement for mongodb from makeline-service
  • Loading branch information
pauldotyu authored Dec 5, 2023
2 parents bf526a0 + cbe906c commit 84b2868
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/makeline-service/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ func connectToMongoDB() (*mongo.Collection, error) {
} else {
clientOptions = options.Client().ApplyURI(mongoUri).
SetAuth(options.Credential{
Username: mongoUser,
Password: mongoPassword,
AuthSource: mongoDb,
Username: mongoUser,
Password: mongoPassword,
}).
SetTLSConfig(&tls.Config{InsecureSkipVerify: true})
SetTLSConfig(&tls.Config{InsecureSkipVerify: false})
}

mongoClient, err := mongo.Connect(ctx, clientOptions)
Expand Down
2 changes: 2 additions & 0 deletions src/store-admin/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module.exports = defineConfig({
port: 8081,
host: '0.0.0.0',
allowedHosts: 'all',
client: false,
webSocketServer: false,
setupMiddlewares: (middlewares, devServer) => {

if (!devServer) {
Expand Down
3 changes: 2 additions & 1 deletion src/store-front/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = defineConfig({
port: 8080,
host: '0.0.0.0',
allowedHosts: 'all',

client: false,
webSocketServer: false,
setupMiddlewares: (middlewares, devServer) => {

if (!devServer) {
Expand Down

0 comments on commit 84b2868

Please sign in to comment.