mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-16 08:12:42 +00:00
revert check client version changes
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import packageJSON from '../../package.json' with { type: "json" };
|
import packageJSON from '../../package.json' with { type: "json" };
|
||||||
const version = packageJSON.version;
|
const version = packageJSON.version;
|
||||||
|
|
||||||
|
//This should be only for internal calls, but right now prevents spam api calls, this should be done with a proper cors policy
|
||||||
|
|
||||||
export default (req, res, next)=>{
|
export default (req, res, next)=>{
|
||||||
console.log(req.headers);
|
|
||||||
//check if req comes from localhost
|
|
||||||
|
|
||||||
const userVersion = req.get('Homebrewery-Version');
|
const userVersion = req.get('Homebrewery-Version');
|
||||||
|
|
||||||
if(userVersion != version) {
|
if(userVersion != version) {
|
||||||
|
|||||||
Reference in New Issue
Block a user