Skip to content

bug: application auth-redirect CORS error #20667

@raphaelfff

Description

@raphaelfff

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When making API calls from out application running behind coder application, after a few seconds, all requests get redirected

Image

and then start failing with:

Access to fetch at 'https://fr.coder.domain/api/v2/applications/auth-redirect?redirect_uri=https%3A%2F%2Facme-dot-backoffice--0--rvigee.fr.coder.domain%2Fredacted%2Fapi%2Fv3%2Fgraphql' (redirected from 'https://acme-dot-backoffice--main--0--rvigee.fr.coder.domain/redacted/api/v3/graphql') from origin 'https://acme-dot-backoffice--main--0--rvigee.fr.coder.domain' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

until the page is refreshed.

This is particularly frustrating for our frontend team which has to spend the whole day refreshing the browser...

Relevant Log Output

Expected Behavior

Not needing to refresh the browser every 10s

Steps to Reproduce

  1. Create an application
  2. Access it
  3. wait 30s
  4. Have it make requests using fetch
  5. See it fail with CORD

Environment

  • Host OS: linux
  • Coder version: 2.27.3

Additional Context

The issue occurs consistently, The issue is new (previously worked fine), The issue happens on multiple deployments, I have tested this on the latest version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions