|
|
@ -30,7 +30,7 @@ export default class URLRedirect extends Model { |
|
|
|
this.setValidation('target_url').defined().maxLength(1745).regexp(/^https?:\/\/.{3,259}?\/?/i); |
|
|
|
} |
|
|
|
|
|
|
|
public getURL(domain: string = config.get<string>('base_url')): string { |
|
|
|
public getURL(domain: string = config.get<string>('public_url')): string { |
|
|
|
return (/^https?:\/\//.test(domain) ? '' : 'https://') + domain + Controller.route('get-url', { |
|
|
|
slug: this.getOrFail('slug'), |
|
|
|
}); |
|
|
|