mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Updated share token logic. Closes #1113.
This commit is contained in:
parent
b5de6b997e
commit
e735a1c50d
12 changed files with 44 additions and 42 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { parseSecureToken, parseToken } from './crypto';
|
||||
import { TOKEN_HEADER } from './constants';
|
||||
import { SHARE_TOKEN_HEADER } from './constants';
|
||||
import { getWebsiteById } from './queries';
|
||||
|
||||
export async function getAuthToken(req) {
|
||||
|
|
@ -30,7 +30,7 @@ export async function isValidToken(token, validation) {
|
|||
|
||||
export async function allowQuery(req, skipToken) {
|
||||
const { id } = req.query;
|
||||
const token = req.headers[TOKEN_HEADER];
|
||||
const token = req.headers[SHARE_TOKEN_HEADER];
|
||||
const websiteId = +id;
|
||||
|
||||
const website = await getWebsiteById(websiteId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue