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

Server-side (Privacy Center) API calls are blocked when testing locally #3851

Closed
NevilleS opened this issue Jul 24, 2023 · 1 comment · Fixed by #3895
Closed

Server-side (Privacy Center) API calls are blocked when testing locally #3851

NevilleS opened this issue Jul 24, 2023 · 1 comment · Fixed by #3895
Assignees
Labels
bug Something isn't working

Comments

@NevilleS
Copy link
Contributor

Bug Description

When running the app locally using any nox commands - but most importantly, using nox -s "fides_env(test)" or fides deploy, there is a FIDES_PRIVACY_CENTER__FIDES_API_URL config var we default to http://localhost:8080/api/v1

This works fine for client-side calls from the browser (both Privacy Center client and the Fides.js client), but these fail when the same call is attempted from the server since it tries to connect to localhost from within the privacy-center docker container.

Steps to Reproduce

  1. Run nox -s "fides_env(test)"
  2. Open http://localhost:3001/fides.js
  3. Observe an Internal Server Error

Expected behavior

Should perform all the server-side initialization and return a fides.js bundle with geolocation and experience prefetched 👍

Environment

  • Version: 2.17.0rc1

Additional context

We might need to support an optional FIDES_PRIVACY_CENTER__SERVER_SIDE_FIDES_API_URL (or similar) to workaround this, as I can't think of a nicer way to get the client & server to agree on the API location when they are technically on different networks.

@Roger-Ethyca
Copy link
Contributor

moving to done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants