Closed p1gp1g closed 2 years ago
The base64 rule on a new endpoint is also required for the v2 embedded_distrib + keeping the old one too
I'll try do it today
Are there any differences between FCM Distributor (FCMD) proxy and Embedded FCM Distributor (EFCMD) proxy apart from the parameters: FCMD: 'body' 'app' EFCMD: 'body' 'instance'
If there isn't any difference other than naming, can v2 make both 'body' & 'instance' so both FCMD and EFCMD can use the same code?
In the FCM JSON payload (i.e. the intents received on android), would it be fine if 'body' 'app' 'instance' are replaced by 'b' 'a' 'i'.
This is because base64 encoding will already have a lot of overhead, this might be a tiny (7-12 byte) improvement.
making 'v2' a query param rather than a /v2 path will simplify the code. is that fine?
Are there any differences between FCM Distributor (FCMD) proxy and Embedded FCM Distributor (EFCMD) proxy apart from the parameters: FCMD: 'body' 'app' EFCMD: 'body' 'instance'
No
If there isn't any difference other than naming, can v2 make both 'body' & 'instance' so both FCMD and EFCMD can use the same code?
Yes, that's possible *
That would probably help to use the EFCMD inside FCMD actually
In the FCM JSON payload (i.e. the intents received on android), would it be fine if 'body' 'app' 'instance' are replaced by 'b' 'a' 'i'.
This is because base64 encoding will already have a lot of overhead, this might be a tiny (7-12 byte) improvement.
That's also possible *
making 'v2' a query param rather than a /v2 path will simplify the code. is that fine?
OK too
* We just need to be careful to use old param for the old versions
Ok, I'll make the endpoint support 3 modes:
v1 FCMD: url: 'token' 'app' - payload: 'body' 'app' v1 EFCMD: url: 'token' 'instance' - payload: 'body' 'instance' v2: url: 'token' 'instance' 'v2' - payload: 'b' 'i'
The 3 modes will be differentiated between based on the url query params
is how they can be used on the client side
ATM it is done with the following nginx + lua rule :
We need to make a
/v2
endpoint that base64 encodes the request to follow AND_2.0.0 and keeping this one for the old one. It will be easier to do it with common-proxies