Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
enzostvs/deepsite
Greff3
/
deepsite
like
3
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
a582fa0
deepsite
/
middlewares
/
checkUser.js
enzostvs
HF Staff
Initial ✨
ea6c2a8
27 days ago
raw
Copy download link
history
blame
Safe
219 Bytes
export
default
async
function
checkUser
(
req, res, next
) {
const
{ hf_token } = req.
cookies
;
if
(!hf_token) {
return
res.
status
(
401
).
send
({
ok
:
false
,
message
:
"Unauthorized"
,
});
}
next
();
}