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

Transmit issue with HTTPS call #34

Open
Sancho66 opened this issue Nov 8, 2024 · 1 comment
Open

Transmit issue with HTTPS call #34

Sancho66 opened this issue Nov 8, 2024 · 1 comment

Comments

@Sancho66
Copy link

Sancho66 commented Nov 8, 2024

Package version

1.0.2

Describe the bug

Hello guys,

When when I try to create a transmit instance like that with https baseUrl in the frontend :

transmitInstance = new Transmit({
            baseUrl: 'https://www.mydomain.com', 
            beforeSubscribe: (request) => {
                request.headers.append('Authorization', `Bearer ${authStore.token}`);
            }
        });

The backend doesn't return any response. When I have an http url (baseUrl) in local or deployed all work properly.
I also checked my cors :

import { defineConfig } from '@adonisjs/cors'

/**
 * Configuration options to tweak the CORS policy. The following
 * options are documented on the official documentation website.
 *
 * https://docs.adonisjs.com/guides/security/cors
 */
const corsConfig = defineConfig({
  enabled: true,
  origin: true,
  methods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE'],
  headers: true,
  exposeHeaders: [],
  credentials: true,
  maxAge: 90,
})

export default corsConfig

I don't really know if it's linked with the https protocol...can you help us ?

Reproduction repo

No response

@Dogson
Copy link

Dogson commented Nov 22, 2024

Hello ! Do your event request stays in a pending state ? If so, I seem to have the same problem, it happens occasionnally and I don't know why.

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

No branches or pull requests

2 participants