-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In my Flutter web deployment, I have to add unsafe-eval to CSP.
This is despite the FAQ section saying otherwise. (which I presume is for rive-web)
Reproduction
I created a simple project and deployed it here: https://unsafe-eval.pages.dev/
You should be able to open dev tools and see the following error:
The project is created with flutter create and adding rive, along with the simple code:
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Scaffold(
body: Column(
children: [
Text('Demo'),
SizedBox.square(
dimension: 500,
child: RiveAnimation.network(
'https://cdn.rive.app/animations/vehicles.riv',
),
),
],
),
),
);
}
}Along with the inline CSP in index.html:
<meta http-equiv="Content-Security-Policy"
content="script-src 'self' 'wasm-unsafe-eval' 'unsafe-inline' www.gstatic.com cdn.jsdelivr.net">I may have missed something here but is there a workaround to avoid adding unsafe-eval?
Versions
- Flutter version
3.29.2 - Rive version
0.13.20
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
