Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(admin-ui): Admin UI: Invalid Request Header #5548

Merged

Conversation

rick-lam
Copy link
Contributor

@rick-lam rick-lam commented Nov 3, 2023

What
Fix of #4904

Fixes
Admin run development server with hostname shown Invalid Request Header

How
Added webpack-dev-server config allowedHosts and webSocketUrl in admin develop options to change allowlist services hostname and Web Socket Url

Testing
Edit medusa-config.js with hostname in admin plugin develop options

const plugins = [
  // ...
  {
    resolve: "@medusajs/admin",
    /** @type {import('@medusajs/admin').PluginOptions} */
    options: {
      develop: {
        allowedHosts: [
          'host.com',
          'subdomain.host.com',
          'subdomain2.host.com',
          'host2.com',
        ],
        webSocketURL: 'wss://host.com/ws'
      },
    },
  },
]

@rick-lam rick-lam requested a review from a team as a code owner November 3, 2023 15:31
Copy link

changeset-bot bot commented Nov 3, 2023

🦋 Changeset detected

Latest commit: 1fd1688

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@medusajs/admin-ui Patch
@medusajs/admin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 3, 2023

@rick-lam is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

@rick-lam rick-lam changed the title Admin webpack-dev-server add allowedHosts in develop config fix(admin-ui): Admin UI: Invalid Request Header Nov 3, 2023
@brunowego
Copy link

@rick-lam can you update the branch?

Copy link
Contributor

@kasperkristensen kasperkristensen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution 👍

Copy link

vercel bot commented Nov 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Nov 9, 2023 0:07am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 9, 2023 0:07am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 9, 2023 0:07am

@kodiakhq kodiakhq bot merged commit b4e8adf into medusajs:develop Nov 9, 2023
@github-actions github-actions bot mentioned this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants