WarcRecordFetcher was splitting out and discarding the HTTP response
headers to get at the HTML body — now it keeps and parses them, so
Server/X-Powered-By headers get captured alongside the <meta
name="generator"> tag already sitting in the parsed DOM. No extra
requests: same WARC segment already fetched for --with-metadata.
Site copies these from its homepage capture, same as
title/description/keywords. New badges on the site detail page show
the detected platform (e.g. "Wix.com Website Builder") and server
signature at a glance.
Verified against real .es data: correctly detected Wix
("00padel.es"), nginx/Apache/Cloudflare server headers, and PHP
X-Powered-By headers across the batch.
55 lines
1.0 KiB
PHP
55 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class SitePage extends Model
|
|
{
|
|
protected $fillable = [
|
|
'site_id',
|
|
'urlkey',
|
|
'urlkey_hash',
|
|
'url',
|
|
'timestamp',
|
|
'mime',
|
|
'mime_detected',
|
|
'status',
|
|
'digest',
|
|
'length',
|
|
'offset',
|
|
'filename',
|
|
'languages',
|
|
'charset',
|
|
'redirect',
|
|
'title',
|
|
'description',
|
|
'keywords',
|
|
'server',
|
|
'powered_by',
|
|
'generator',
|
|
'content',
|
|
'raw',
|
|
'record_hash',
|
|
];
|
|
|
|
protected $casts = [
|
|
'raw' => 'array',
|
|
'status' => 'integer',
|
|
'length' => 'integer',
|
|
'offset' => 'integer',
|
|
];
|
|
|
|
public function site(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Site::class);
|
|
}
|
|
|
|
public function links(): HasMany
|
|
{
|
|
return $this->hasMany(Backlink::class);
|
|
}
|
|
}
|