<@U04UQ68083H> why am I getting this error when tr...
# ory-copilot
b
@chilly-king-10285 why am I getting this error when trying to setup a basic server:
Copy code
http: proxy error: unsupported protocol scheme "localhost"
c
A message from kapa.ai
The error message you're seeing suggests that there might be an issue with how you're specifying the domain in your configuration. In Ory, it's important to consistently use either
127.0.0.1
or
localhost
across your configuration, as they are treated as separate domains. Mixing them up can lead to issues. When developing locally, you should use either
localhost
or
127.0.0.1
, but not both. Although technically these mean the same thing, they're different hostnames. Using both interchangeably in your code can cause problems with the origin of HTTP cookies sent by the application. When that happens, Ory APIs might not be able to read the cookies sent by your app. For example, if you're using the Ory Proxy for local development, you might start it with a command like this:
Copy code
bash $ ory proxy --dev --project <your-project-slug> <http://localhost:3000>
In this command,
<http://localhost:3000>
is the location of your application. All traffic arriving at the Ory Proxy will be passed through to this URL. If you're still having trouble, please double-check your configuration and make sure you're using
localhost
or
127.0.0.1
consistently. Sources: - [Ory Kratos CSRF Troubleshooting](https://www.ory.sh/docs/kratos/debug/csrf#mixing-up-127001-and-localhost) - [Ory Hydra CSRF Pitfalls](https://www.ory.sh/docs/self-hosted/hydra/debug/csrf#mixing-up-127001-and-localhost) - [Ory Proxy Local Development](https://www.ory.sh/docs/cli/ory-proxy#developing-locally) - [Integrating Authentication into Vue.js + API](https://www.ory.sh/docs/getting-started/integrate-auth/vue#run-ory-apis-on-localhost)