Skip to content

Support for private & public url #290

@crbast

Description

@crbast

Is your feature request related to a problem? Please describe.

Currently it's only possible to set one value for the configuration field "URL". On some setups the url called by the server is not the same as the browser (example: In a k8s cluster we have internal domains and we can close the connection to outside of the pod).

Describe the solution you'd like (not working)

One solution could be to use the private/public runtime configuration. Here an example (nuxt.config.ts):

export default defineNuxtConfig({
        //...
	runtimeConfig: {
		directus: {
			url: '',
			autoFetch: true,
			autoRefresh: true,
		},
		public: {
			directus: {
				url: '',
				autoFetch: true,
				autoRefresh: true
			},
		},
	}
});

Describe alternatives you've considered

The current alternative is to manipulate the DNS of the pod to redirect to the right server. But it can be really painful when dealing the SSL certificates.

Additional context

Thank you for your help. I wish you a lovely day :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions