Skip to content

feat: blocking blogs & hyvor.com/blogs redirects - #938

Merged
supun-io merged 9 commits into
mainfrom
blocking2
Sep 30, 2026
Merged

supun-io merged 9 commits into
mainfrom
blocking2

Conversation

@supun-io

@supun-io supun-io commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

fixes #923
closes #934
also adds license check

@supun-io
supun-io requested a review from Nadil-K September 29, 2026 13:32

@Nadil-K Nadil-K left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Populate blocked_at column with the legacy is_blocked column
    (314 existing blogs with with is_blocked=true)

@Nadil-K Nadil-K Sep 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use $this->blogResponse($blog)

if ($this->internalConfig->getDeployment()->isCloud()) {
$base = rtrim($this->internalConfig->getInstance(), '/') . '/blogs';
} else {
$base = $this->appConfig->getTlsMode()->getScheme() . '://' . $this->appConfig->getDomainApp() . '/';

@Nadil-K Nadil-K Sep 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Why a trailing / here?

302
);
if ($blog === null) {
return $this->homepageRedirector->redirect('subdomain', $host, 'notfound');

@Nadil-K Nadil-K Sep 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • not_found?

302
);
if ($blog === null) {
return $this->homepageRedirector->redirect('custom_domain', $host, 'notfound');

@Nadil-K Nadil-K Sep 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • not_found?

@supun-io

supun-io commented Sep 30, 2026 •

Copy link
Copy Markdown
Member Author
UPDATE blogs
            SET blocked_at = COALESCE(updated_at, NOW())
            WHERE is_blocked = true
                AND blocked_at IS NULL

@supun-io

Copy link
Copy Markdown
Member Author

there was only one row with is_blocked = true and blocked_at is NULL

@supun-io
supun-io enabled auto-merge (squash) September 30, 2026 13:00
@supun-io
supun-io merged commit c43105e into main Sep 30, 2026
4 checks passed
@supun-io
supun-io deleted the blocking2 branch September 30, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add Dockerfile healthcheck feat: ban blogs from sudo, check ban on blog load

2 participants