Add CORS expose headers for PDF viewer compatibility
This commit is contained in:
@@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user