···2323 };
24242525 services.caddy.virtualHosts.${cfg.PDS_HOSTNAME}.extraConfig = ''
2626- reverse_proxy :${toString cfg.PDS_PORT}
2626+ handle /oauth/* {
2727+ # HACK: For some reason the PDS only accepts cross-site, same-origin
2828+ # or none for Sec-Fetch-Site for the initial AppView -> PDS flow,
2929+ # meaning that you cannot put an AppView and a PDS under two subdomains
3030+ # in the same domain. I think that's dumb and buggy, so let's hack
3131+ # around this
3232+ request_header Sec-Fetch-Site same-origin
3333+3434+ reverse_proxy :${toString cfg.PDS_PORT}
3535+ }
3636+ handle {
3737+ reverse_proxy :${toString cfg.PDS_PORT}
3838+ }
2739 '';
28402941 # services.postgresql = {