add news: url support

This commit is contained in:
zefie
2022-11-30 21:02:39 -05:00
parent 3ffadd8422
commit 2cde307e20
4 changed files with 16 additions and 1 deletions

View File

@@ -194,7 +194,7 @@ function getServiceString(service, overrides = {}) {
// used externally by service scripts // used externally by service scripts
if (service === "all") { if (service === "all") {
var out = ""; var out = "";
Object.keys(minisrv_config.services).forEach(function (k) { Object.keys(minisrv_config.services).sort().forEach(function (k) {
if (!isConfiguredService(k)) return true; if (!isConfiguredService(k)) return true;
if (minisrv_config.services[k].pc_services) return true; if (minisrv_config.services[k].pc_services) return true;

View File

@@ -0,0 +1,5 @@
var minisrv_service_file = true;
var dest_url = "wtv-news:/news?group=" + request_headers.request_url.split(":")[1];
headers = `300 Moved
Location: ${dest_url}`

View File

@@ -144,6 +144,12 @@
], ],
"groupMetaRefreshInterval": 86400 // not yet used "groupMetaRefreshInterval": 86400 // not yet used
}, },
"news": {
// for news:group.name urls
"port": 1605,
"nobind": true,
"flags": "0x00000004"
},
"wtv-register": { "wtv-register": {
// wtv-register // wtv-register
"port": 1607, "port": 1607,

View File

@@ -196,6 +196,9 @@
<Content Include="includes\ServiceVault\http_pc\favicon.ico" /> <Content Include="includes\ServiceVault\http_pc\favicon.ico" />
<Content Include="includes\ServiceVault\http_pc\index.js" /> <Content Include="includes\ServiceVault\http_pc\index.js" />
<Content Include="includes\ServiceVault\http_pc\viewergen\index.js" /> <Content Include="includes\ServiceVault\http_pc\viewergen\index.js" />
<Content Include="includes\ServiceVault\news\catchall.js">
<SubType>Code</SubType>
</Content>
<Content Include="includes\ServiceVault\SharedROMCache\AccountBanner.gif" /> <Content Include="includes\ServiceVault\SharedROMCache\AccountBanner.gif" />
<Content Include="includes\ServiceVault\SharedROMCache\AroundTownIcon2.gif" /> <Content Include="includes\ServiceVault\SharedROMCache\AroundTownIcon2.gif" />
<Content Include="includes\ServiceVault\SharedROMCache\AT_BannerGradient.gif" /> <Content Include="includes\ServiceVault\SharedROMCache\AT_BannerGradient.gif" />
@@ -2337,6 +2340,7 @@
<Folder Include="includes\ServiceVault\" /> <Folder Include="includes\ServiceVault\" />
<Folder Include="includes\ServiceVault\http_pc\" /> <Folder Include="includes\ServiceVault\http_pc\" />
<Folder Include="includes\ServiceVault\http_pc\viewergen\" /> <Folder Include="includes\ServiceVault\http_pc\viewergen\" />
<Folder Include="includes\ServiceVault\news\" />
<Folder Include="includes\ServiceVault\SharedROMCache\" /> <Folder Include="includes\ServiceVault\SharedROMCache\" />
<Folder Include="includes\ServiceVault\SharedROMCache\help\" /> <Folder Include="includes\ServiceVault\SharedROMCache\help\" />
<Folder Include="includes\ServiceVault\SharedROMCache\help\common\" /> <Folder Include="includes\ServiceVault\SharedROMCache\help\common\" />