Add CORS expose headers for PDF viewer compatibility

This commit is contained in:
Leon Bösche
2026-01-10 19:16:23 +01:00
parent 54fa429e3e
commit 288363d2da
2 changed files with 4 additions and 3 deletions

View File

@@ -140,9 +140,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
onPressed: () {
final name = controller.text.trim();
if (name.isNotEmpty) {
BlocProvider.of<OrganizationBloc>(context).add(
CreateOrganization(name),
);
BlocProvider.of<OrganizationBloc>(
context,
).add(CreateOrganization(name));
Navigator.of(context).pop();
}
},

View File

@@ -43,6 +43,7 @@ func CORS(allowedOrigins string) func(http.Handler) http.Handler {
}
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
w.Header().Set("Access-Control-Expose-Headers", "Content-Length, Content-Type, Content-Disposition")
w.Header().Set("Access-Control-Max-Age", "3600")
if r.Method == http.MethodOptions {