Commit 5f006cc 1 parent 52dfc7c commit 5f006cc Copy full SHA for 5f006cc
File tree 1 file changed +9
-6
lines changed
examples/official-site/sqlpage/migrations
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 2
2
INSERT INTO component (name, description, icon)
3
3
VALUES (
4
4
' cookie' ,
5
- ' Sets a cookie in the client browser, used for session management and storing user-related information.
6
-
7
- This component creates a single cookie. Since cookies need to be set before the response body is sent to the client,
8
- this component should be placed at the top of the page, before any other components that generate output.
5
+ '
6
+ Sets a cookie in the client browser, used for session management and storing user-related information.
9
7
10
- After being set, a cookie can be accessed anywhere in your SQL code using the `sqlpage.cookie(' ' cookie_name' ' )` pseudo-function.' ,
8
+ This component creates a single cookie. Since cookies need to be set before the response body is sent to the client,
9
+ this component should be **placed at the top of the page**, before any other components that generate output.
10
+
11
+ After being set, a cookie can be accessed anywhere in your SQL code using the `sqlpage.cookie(' ' cookie_name' ' )` pseudo-function.
12
+
13
+ Note that if your site is accessed over HTTP (and not HTTPS), you have to set `false as secure` to force browsers to accept your cookies.' ,
11
14
' cookie'
12
15
);
13
16
-- Insert the parameters for the http_header component into the parameter table
@@ -119,4 +122,4 @@ SELECT ''text'' as component,
119
122
' ' Your name is ' ' || COALESCE(sqlpage.cookie(' ' username' ' ), ' ' not known to us' ' );
120
123
```
121
124
'
122
- );
125
+ );
You can’t perform that action at this time.
0 commit comments