Skip to content

Commit e18bebd

Browse files
author
Erin
committed
2.1.1
1 parent 35e68ca commit e18bebd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tibiachar.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
3-
TibiaChar RPC Server 2.1
3+
TibiaChar RPC Server 2.1.1
44
5-
Provies Tibia character profile data via a JSON API.
5+
Provides Tibia character profile data via a JSON API.
66
77
Hint: Hash the name with a seed, have users put it in their comment section,
88
and you have a confirmed method of linking tibia profiles to other profiles?
@@ -20,18 +20,19 @@ Sha.js: $ npm install sha.js
2020

2121
// Config:
2222
const port = 9980; // set the port for the RPC server to listen on. Default for TibiaChar is 9980.
23-
const seed = 'ygfkdsgif87yt7o8fhkshksjhf7'; // CHANGE THIS. 10 - infinity random chars, more chars = more secure, but slower. Around 30 is good.
23+
const seed = 'fjylhojjhnmmjkftjyjtyjyuiuyjthdg'; // CHANGE THIS. Ten to infinity random chars, more chars = more secure, but slower. Around 30 is good.
24+
const allowed = "*"; // Whether the API is public or not. Not a secure method of keeping others out. "*" for public, "localhost" for private.
2425

2526

26-
//This is the code. Don't mess if you think you might break something.
27+
//This is the code.
2728

2829

2930
console.log('-----------------------------------------');
3031
console.log('| _____ _ _ _ _____ _ |');
3132
console.log('| |_ _|_| |_|_|___| | |_ ___ ___ |');
3233
console.log('| | | | | . | | .\'| --| | .\'| _| |');
3334
console.log('| |_| |_|___|_|__,|_____|_|_|__,|_| |');
34-
console.log('------------------------------------v2.1-');
35+
console.log('----------------------------------v2.1.1-');
3536

3637

3738
function tibiachar(){
@@ -135,8 +136,7 @@ function sha(inp){
135136
}
136137

137138
rpc.use(function(req, res, next){
138-
res.header("Access-Control-Allow-Origin", "*");
139-
//res.header("Content-Type", "application/json");
139+
res.header("Access-Control-Allow-Origin", allowed);
140140
next();
141141
});
142142

0 commit comments

Comments
 (0)