mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
x-client-package
Albums app is using the old axios layer which is passing "x-client-package", will also allow that for now
This commit is contained in:
parent
b781f33e4b
commit
290564c973
@ -26,6 +26,7 @@ const handleOPTIONS = (request: Request) => {
|
||||
"Access-Control-Allow-Methods": "GET, OPTIONS",
|
||||
"Access-Control-Max-Age": "86400",
|
||||
// "Access-Control-Allow-Headers": "X-Auth-Access-Token, X-Auth-Access-Token-JWT",
|
||||
// "Access-Control-Allow-Headers": "X-Auth-Access-Token, X-Auth-Access-Token-JWT, x-client-package",
|
||||
"Access-Control-Allow-Headers": "*",
|
||||
},
|
||||
});
|
||||
@ -45,7 +46,12 @@ const isAllowedOrigin = (origin: string | null) => {
|
||||
};
|
||||
|
||||
const areAllowedHeaders = (headers: string | null) => {
|
||||
const allowed = ["x-auth-access-token", "x-auth-access-token-jwt"];
|
||||
// TODO(MR): Stop sending "x-client-package"
|
||||
const allowed = [
|
||||
"x-auth-access-token",
|
||||
"x-auth-access-token-jwt",
|
||||
"x-client-package",
|
||||
];
|
||||
|
||||
if (!headers) return true;
|
||||
for (const header of headers.split(",")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user