Skip to content

Commit

Permalink
[Dadoum#61] Add Implement-Version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Mar 29, 2023
1 parent dc75dca commit b863447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
14 changes: 4 additions & 10 deletions anisette_server/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,10 @@ void main(string[] args) {
auto dir = apk.directory();

if (!file.exists("lib/")) {
try {
file.mkdir("lib/");
} catch (Throwable) {
writeln("Cannot create lib/ folder. Hopefully everything still works. (Docker?)");
}
file.mkdir("lib/");
}
if (!file.exists(libraryPath)) {
try {
file.mkdir(libraryPath);
} catch (Throwable) {
writeln("Cannot create libraries folder folder. Hopefully everything still works. (Docker?)");
}
file.mkdir(libraryPath);
}
file.write(coreADIPath, apk.expand(dir[coreADIPath]));
file.write(SSCPath, apk.expand(dir[SSCPath]));
Expand Down Expand Up @@ -113,6 +105,8 @@ void main(string[] args) {
}

auto s = new HttpServer((ref ctx) {
ctx.response.addHeader("Implementation-Version", anisetteServerBranding ~ " " ~ anisetteServerVersion);

auto req = ctx.request;
auto res = ctx.response;
if (req.url == "/version") {
Expand Down
1 change: 1 addition & 0 deletions anisette_server/constants.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module constants;

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

0 comments on commit b863447

Please sign in to comment.