Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

PRO-8133: Add host validation error handling - #24

Merged
myovchev merged 8 commits into
mainfrom
PRO-8133-allowed-hosts
Nov 20, 2025
Merged

myovchev merged 8 commits into
mainfrom
PRO-8133-allowed-hosts

Conversation

@myovchev

@myovchev myovchev commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Summary

Add host validation error handling and tests for Vite middleware

What are the specific steps to test this change?

Requests with not allowed hosts prints console warning.

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@linear

linear Bot commented Nov 6, 2025

Copy link
Copy Markdown

@myovchev
myovchev requested a review from haroun November 6, 2025 13:31
Comment thread index.js Resolved
Comment thread index.js Resolved
@myovchev
myovchev requested a review from haroun November 13, 2025 14:25
Comment thread index.js Resolved
@myovchev
myovchev requested a review from haroun November 14, 2025 15:08
@haroun

haroun commented Nov 20, 2025

Copy link
Copy Markdown
Contributor
⚠️  Vite dev server blocked a request from hostname: en-gb-site.test:3000
   This hostname is not in the allowed hosts list.
   To fix this, add the hostname to your Vite configuration:

   // apos.vite.config.js
   import { defineConfig } from '@apostrophecms/vite/vite';

   export default defineConfig({
     server: {
       allowedHosts: ['en-gb-site.test', 'localhost']
     }
   });

cc: @BoDonkey for documentation

@myovchev
myovchev merged commit f03e676 into main Nov 20, 2025
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants