Revert "[fix] Try something to be independent from github"

This commit is contained in:
Alexandre Aubin 2019-11-16 16:36:21 +01:00 committed by GitHub
parent 3e886cdb6f
commit 0e2fcaa4a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -578,6 +578,7 @@
}
});
// Install custom app from github
app.post('#/apps/install/custom', function(c) {
var params = {
@ -594,9 +595,10 @@
// Force trailing slash
params.app = params.app.replace(/\/?$/, '/');
var giturl = params.app + "raw/master/manifest.json";
// Get manifest.json to get additional parameters
jQuery.ajax({
url: giturl,
url: params.app.replace('github.com', 'raw.githubusercontent.com') + 'master/manifest.json',
type: 'GET',
})
.done(function(manifest) {

View file

@ -73,7 +73,7 @@
<div class="form-group has-feedback">
<label for="url" class="col-sm-12">{{t 'url'}}</label>
<div class="col-sm-12">
<input type="url" id="url" name="url" class="form-control" value="" placeholder="https://GITHOST.TLD/USER/(...)/REPOSITORY" required>
<input type="url" id="url" name="url" class="form-control" value="" placeholder="https://github.com/USER/REPOSITORY" required pattern="^https://github.com/[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_.]+[/]?$">
<p class="text-warning">
<span class="fa-github"></span> {{t 'custom_app_url_only_github'}}
</p>