Skip to content

[Bug]: Can't connect to socket server #73

Description

@exotexot

What issue are you experiencing?

I'm running strapi and my frontend in a docker container.
I'm using nginx as reverse proxy.

Strapi url: http://localhost/strapi
frontend url: http:/localhost/frontend

in my client I just setup my socket like:

import { io } from "socket.io-client"
export const socket = io(http://localhost/strapi)

strapi/config/plugins.ts:

export default ({ env }) => ({
  io: {
    enabled: true,
    config: {
      // This will listen for all supported events on the article content type
      contentTypes: ["api::session.session", "api::player.player"],
    },
  },
});

Screenshot 2023-12-07 at 17 07 29

Steps To Reproduce

No response

What version of the plugin are you using?

2.0.4

What strapi version are you using?

4.15.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions