Browse Source

update

master
Cailean Finn 4 months ago
parent
commit
f2b1ee83f7
  1. 8
      server.js

8
server.js

@ -7,7 +7,7 @@ require('dotenv').config();
const app = express();
const PORT = process.env.PORT || 3000;
const GITEA_SECRET = "123";
const GITEA_SECRET = process.env.GITEA_SECRET;
// Serve static files from the 'public' directory
app.use(express.static(path.join(__dirname, 'public')));
@ -67,12 +67,6 @@ app.post('/api', (req, res) => {
// Verify the secret
const hmac = crypto.createHmac('sha256', GITEA_SECRET);
const digest = hmac.update(payload).digest('hex');
console.log('Signature from Gitea:', signature);
console.log('Computed digest:', digest);
console.log('Payload:', payload);
console.log('Secret:', GITEA_SECRET);
const bufferSignature = Buffer.from(signature, 'hex');
const bufferDigest = Buffer.from(digest, 'hex');

Loading…
Cancel
Save