<@U04UQ68083H> why do I need to set `ORY_SDK_URL` ...
# ory-copilot
b
@chilly-king-10285 why do I need to set
ORY_SDK_URL
when using Ory Proxy?
c
A message from kapa.ai
New message text here
b
@chilly-king-10285 But what if I'm developing an open source project and I don't want to expose my project/make my contributors login to Ory? I simply want a simple reverse proxy locally
c
A message from kapa.ai
If you're developing an open-source project and you don't want to expose your project or require contributors to log in to Ory, you can still use Ory Proxy as a simple reverse proxy locally. When using Ory Proxy for local development, you point it to the URL where your application runs. For example, if your application is available at
<http://localhost:3000>
, you would run this command:
Copy code
bash ory proxy <http://localhost:3000>
By default, Ory Proxy creates an entry point at
<http://localhost:4000>
. To get access to Ory endpoints, you must access the app through the proxy using this URL instead of the actual address on which your application is running. If you want to adjust the entry point URL, pass the desired address along with the application URL, for example:
Copy code
bash ory proxy <http://localhost:3000> <http://localhost:3001>
Remember, Ory Proxy is a tool that helps with local development by allowing your app and Ory to run on the same domain. It rewrites cookies to match the domain your application is currently on, converts sessions into JSON Web Tokens (JWTs), and ensures that cookies and URLs are properly configured. For more details, refer to the [Ory Proxy documentation](https://www.ory.sh/docs/guides/cli/proxy-and-tunnel#ory-proxy).
b
@chilly-king-10285 yeah but why do they have to connect to the outside world? i only want the reverse proxy to work locally
c
A message from kapa.ai
The Ory Proxy is designed to work as a reverse proxy that mirrors Ory endpoints on the same domain as your application. It's primarily used to avoid issues with the browser's CORS policy by rewriting cookies to match the domain your application is currently on. This is particularly useful when you're developing locally and want to connect your application to the Ory Network and consume the APIs without additional configuration or self-hosting any Ory services. However, if you only want a simple reverse proxy to work locally and don't need to connect to the Ory Network or use Ory services, you might not need the Ory Proxy. Instead, you could use other local reverse proxy solutions that don't require an external connection. These could be tools like Nginx, HAProxy, or even built-in solutions in some programming languages and frameworks. Remember, the primary purpose of the Ory Proxy is to facilitate the integration of your application with Ory services by handling issues related to CORS and cookie management. If you don't need these features, a simpler local reverse proxy might be more suitable for your needs.
m
hey @brash-raincoat-15175 when you are self-hosting Ory you dont necessarily need Ory Proxy/Tunnel to develop locally - you control the network setup after al
b
@magnificent-energy-493 Cool, got it 🙂 thanks!