Skip to content

override domain question #475

Closed Answered by diced
anispwyn asked this question in Questions
Oct 20, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

i dont know how caddy works so I'll try explaining in a way that is general I guess. lets say you have your main domain you send upload requests from: img.example.com [POST https://up.example.com/api/upload, Headers: (all the necessary shit + Override-Domain: file.example.com)] - this will output https://file.example.com/u/file.ext instead of https://up.example.com/u/file.ext (the default).

to make this work you need to make sure that up.example.com points to the same adress as file.example.com, whether it's through your registrars dns or caddy/nginx/apache (or anything else).

for example, since im familiar with nginx you would do the following:

server {
  listen 80 default_server;
  clie…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@anispwyn
Comment options

@diced
Comment options

Answer selected by anispwyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants