Skip to content

Commit b863447

Browse files
authored
[#61] Add Implement-Version tag
1 parent dc75dca commit b863447

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

anisette_server/app.d

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,10 @@ void main(string[] args) {
7272
auto dir = apk.directory();
7373

7474
if (!file.exists("lib/")) {
75-
try {
76-
file.mkdir("lib/");
77-
} catch (Throwable) {
78-
writeln("Cannot create lib/ folder. Hopefully everything still works. (Docker?)");
79-
}
75+
file.mkdir("lib/");
8076
}
8177
if (!file.exists(libraryPath)) {
82-
try {
83-
file.mkdir(libraryPath);
84-
} catch (Throwable) {
85-
writeln("Cannot create libraries folder folder. Hopefully everything still works. (Docker?)");
86-
}
78+
file.mkdir(libraryPath);
8779
}
8880
file.write(coreADIPath, apk.expand(dir[coreADIPath]));
8981
file.write(SSCPath, apk.expand(dir[SSCPath]));
@@ -113,6 +105,8 @@ void main(string[] args) {
113105
}
114106

115107
auto s = new HttpServer((ref ctx) {
108+
ctx.response.addHeader("Implementation-Version", anisetteServerBranding ~ " " ~ anisetteServerVersion);
109+
116110
auto req = ctx.request;
117111
auto res = ctx.response;
118112
if (req.url == "/version") {

anisette_server/constants.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module constants;
22

3+
enum anisetteServerBranding = "anisette-server-provision";
34
enum anisetteServerVersion = "1.2.2";
45
enum nativesUrl = "https://apps.mzstatic.com/content/android-apple-music-apk/applemusic.apk";

0 commit comments

Comments
 (0)