Pitu пре 7 година
родитељ
комит
11d6c00d89
1 измењених фајлова са 16 додато и 14 уклоњено
  1. 16 14
      config.sample.js

+ 16 - 14
config.sample.js

@@ -1,16 +1,23 @@
 module.exports = {
 
-	/* 
-	NOTES:
-		All folders specified on this file will be created automagically.
-		Ideally the only options you should change are port and basedomain.
-	*/
+	/*
+		If set to true the user will need to specify the auto-generated token
+		on each API call, meaning random strangers wont be able to use the service
+		unless they have the token loli-safe provides you with.
 
-	// Should this instance of loli-safe be private? If so, a client token will be needed for uploads
+		If it's set to false, then upload will be public for anyone to use.
+	*/
 	private: true,
 	
-	// Your base domain where the app is running. Remember to finish it with '/'
-	basedomain: 'https://i.kanacchi.moe/',
+	// The registered domain where you will be serving the app. Use IP if none.
+	domains: [
+
+		// Files will be served at https://i.kanacchi.moe/file.png
+		{ base: 'https://i.kanacchi.moe/', prefix: ''},
+
+		// Files will be served at http://localhost:9999/files/file.png
+		{ base: 'http://127.0.0.1:9999/', prefix: 'files/'}
+	],
 
 	// Port on which to run the server
 	port: 9999,
@@ -18,16 +25,11 @@ module.exports = {
 	// Uploads config
 	uploads: {
 
-		// If prefix is set, it will be appended at the end of basedomain. Remember to finish it with `/`
-		// Ex: https://i.kanacchi.moe/prefix/k4n4.png
-		// Leave blank to use the basedomain.
-		prefix: '',
-
 		// Folder where images should be stored
 		folder: 'uploads',
 
 		// Max file size allowed
-		maxsize: '512MB',
+		maxSize: '512MB',
 
 		// The length of the random generated name for the uploaded files
 		fileLength: 32,