fix issue that avatar can not be changed.

This commit is contained in:
jackyzy823
2022-04-10 22:46:06 +08:00
parent 7dc214a446
commit 06869c7ba8
3 changed files with 8 additions and 6 deletions

View File

@@ -9,8 +9,11 @@ persistencepath: .
#! [WARNING] DO NOT DOWNGRADE WITHOUT A CLEAN DB SINCE SCHEMA CANNOT DOWNGRADE.
#! latest tested version is : v1.222.0
#! latest tested version is : v1.229.2
#! [WORKAROUND] we use method to to resolve below issue
#! [ISSUE] cannot change avatar due to https://github.com/mozilla/fxa/pull/7972 -> checkAvatar -> we have same domain with monogramUrl's one. issue: https://github.com/mozilla/fxa/issues/12426
#! so either 1. use different domain like profile-img or 2. patch it
#! [WORKAROUND] add LASTACCESSTIME_UPDATES_SAMPLE_RATE=1 to make sync api/v1/account/devices not return 500. see https://github.com/mozilla/fxa/issues/12373
#! [ISSUE][RESOLVED] v1.222.0 db-migration db connection need not workaround now.
#! [WORKAROUD] v1.219.5 require smtp.user and smtp.pass (even not used) to make fxa-auth-server not send mail by AWS SES. (will cause a crash if AWS_ACCESS_KEY not set)
@@ -22,7 +25,7 @@ persistencepath: .
#! [NOTE] v1.173+ change base docker image . missing key_*.json in fxa-auth-server so we change to branch br-v1.174.0 to apply breaking changes
#! by default we use tested version , using latest at your own risk.
fxa_version: "v1.222.0"
fxa_version: "v1.229.2"
option:
sync:

View File

@@ -462,7 +462,7 @@ services:
#! last $ need escape? yes
- #@ "IMG_PROVIDERS_FXA=^https://{profile}.{domain_name}/img/a/[0-9a-f]{{32}}$$".format(profile=data.values.domain.profile , domain_name = data.values.domain.name)
- #@ "IMG_URL=https://{profile}.{domain_name}/img/a/{{id}}".format(profile=data.values.domain.profile , domain_name = data.values.domain.name)
#! - PUBLIC_URL -> <del>but not used in code? </del> now used.
#! - PUBLIC_URL -> <del>but not used in code? </del> now used. #for monogram avatar url see: https://github.com/mozilla/fxa/pull/7972
- #@ "PUBLIC_URL=https://{profile}.{domain_name}".format(profile=data.values.domain.profile , domain_name = data.values.domain.name)
- MYSQL_HOST=mysqldb
#! merge from fxa-profile-server/config/development.json
@@ -479,7 +479,7 @@ services:
- ./wait:/wait
#! new added (because of npm preinstall is removed , so in docker images there's no /app/var/public , however it is not used )
- #@ "{persistencepath}/public:/fxa/packages/fxa-profile-server/var/public/".format(persistencepath=data.values.persistencepath)
command: sh -c "/wait && node bin/server.js"
command: sh -c "sed -i 's|result.avatar.startsWith(monogramUrl)|result.avatar.startsWith(`$${monogramUrl}/v1/avatar/`)|' /fxa/packages/fxa-profile-server/lib/routes/profile.js && /wait && node bin/server.js"
restart: unless-stopped
logging: *default-logging

View File

@@ -2,13 +2,12 @@ git diff v<current> v<new> --
packages/browserid-verifier/lib/config.js
packages/browserid-verifier/config/production.json
packages/fxa-auth-server/config
#packages/fxa-auth-db-mysql/config/config.js
packages/fxa-content-server/server/config
packages/fxa-content-server/server/lib/configuration.js
packages/fxa-profile-server/config
packages/fxa-profile-server/lib/config.js
# graphql config and file modified in work around
packages/db-migrations/bin/patcher.mjs
packages/fxa-graphql-api/src/config.ts
packages/fxa-graphql-api/src/backend/auth-client.service.ts
packages/fxa-auth-client/lib/client.ts
packages/fxa-profile-server/lib/routes/profile.js