@enjoys/context-engine 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +477 -100
- package/data/commands/dockerfile.json +66 -0
- package/data/commands/lua.json +66 -0
- package/data/commands/manifest.json +3 -0
- package/data/commands/sql.json +34 -0
- package/data/completion/caddy.json +1589 -0
- package/data/completion/dockerfile.json +1062 -313
- package/data/completion/lua.json +2283 -617
- package/data/completion/nginx.json +804 -1
- package/data/completion/redis-cli.json +3405 -0
- package/data/completion/sql.json +2684 -552
- package/data/defination/caddy.json +428 -0
- package/data/defination/dockerfile.json +211 -29
- package/data/defination/lua.json +875 -125
- package/data/defination/nginx.json +164 -1
- package/data/defination/redis-cli.json +1853 -0
- package/data/defination/sql.json +998 -326
- package/data/hover/caddy.json +458 -0
- package/data/hover/dockerfile.json +180 -42
- package/data/hover/lua.json +775 -69
- package/data/hover/nginx.json +760 -0
- package/data/hover/redis-cli.json +1088 -0
- package/data/hover/sql.json +1119 -76
- package/data/manifest.json +14 -2
- package/package.json +6 -2
|
@@ -759,6 +759,809 @@
|
|
|
759
759
|
"insertText": "user ${1:www-data};\nworker_processes auto;\npid /run/nginx.pid;\nerror_log /var/log/nginx/error.log warn;\n\nevents {\n worker_connections 1024;\n multi_accept on;\n}\n\nhttp {\n include mime.types;\n default_type application/octet-stream;\n\n log_format main '\\$remote_addr - \\$remote_user [\\$time_local] \"\\$request\" '\n '\\$status \\$body_bytes_sent \"\\$http_referer\" '\n '\"\\$http_user_agent\"';\n access_log /var/log/nginx/access.log main;\n\n sendfile on;\n tcp_nopush on;\n tcp_nodelay on;\n keepalive_timeout 65;\n types_hash_max_size 2048;\n client_max_body_size 50m;\n\n gzip on;\n gzip_vary on;\n gzip_types text/plain text/css application/json application/javascript text/xml;\n\n include /etc/nginx/conf.d/*.conf;\n include /etc/nginx/sites-enabled/*;\n}",
|
|
760
760
|
"insertTextRules": 4,
|
|
761
761
|
"sortText": "14_main"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"label": "stream block",
|
|
765
|
+
"kind": 15,
|
|
766
|
+
"detail": "TCP/UDP proxy block",
|
|
767
|
+
"documentation": {
|
|
768
|
+
"value": "TCP/UDP stream proxy configuration.\n\n```nginx\nstream {\n upstream backend {\n server 10.0.0.1:3306;\n }\n server {\n listen 3306;\n proxy_pass backend;\n }\n}\n```"
|
|
769
|
+
},
|
|
770
|
+
"insertText": "stream {\n\tupstream ${1:backend} {\n\t\tserver ${2:10.0.0.1:3306};\n\t}\n\tserver {\n\t\tlisten ${3:3306};\n\t\tproxy_pass ${1:backend};\n\t}\n}",
|
|
771
|
+
"insertTextRules": 4,
|
|
772
|
+
"sortText": "01_stream"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"label": "auth_request",
|
|
776
|
+
"kind": 14,
|
|
777
|
+
"detail": "Subrequest authentication",
|
|
778
|
+
"documentation": {
|
|
779
|
+
"value": "Implements authentication via subrequest.\n\n```nginx\nlocation /protected/ {\n auth_request /auth;\n auth_request_set $auth_user $upstream_http_x_user;\n}\n\nlocation = /auth {\n internal;\n proxy_pass http://auth-server/verify;\n proxy_pass_request_body off;\n proxy_set_header Content-Length \"\";\n}\n```"
|
|
780
|
+
},
|
|
781
|
+
"insertText": "auth_request ${1:/auth};",
|
|
782
|
+
"insertTextRules": 4,
|
|
783
|
+
"sortText": "06_auth_request"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"label": "auth_request_set",
|
|
787
|
+
"kind": 14,
|
|
788
|
+
"detail": "Set variable from auth subrequest",
|
|
789
|
+
"documentation": {
|
|
790
|
+
"value": "Set a variable from the auth subrequest response header.\n\n```nginx\nauth_request_set $auth_user $upstream_http_x_user;\n```"
|
|
791
|
+
},
|
|
792
|
+
"insertText": "auth_request_set \\$${1:variable} \\$${2:upstream_http_x_header};",
|
|
793
|
+
"insertTextRules": 4,
|
|
794
|
+
"sortText": "06_auth_request_set"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"label": "real_ip_header",
|
|
798
|
+
"kind": 14,
|
|
799
|
+
"detail": "Set real client IP header",
|
|
800
|
+
"documentation": {
|
|
801
|
+
"value": "Define header to extract real client IP (behind proxy/CDN).\n\n```nginx\nreal_ip_header X-Forwarded-For;\n# or: real_ip_header X-Real-IP;\n# or: real_ip_header proxy_protocol;\n```"
|
|
802
|
+
},
|
|
803
|
+
"insertText": "real_ip_header ${1|X-Forwarded-For,X-Real-IP,proxy_protocol|};",
|
|
804
|
+
"insertTextRules": 4,
|
|
805
|
+
"sortText": "06_real_ip_header"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"label": "set_real_ip_from",
|
|
809
|
+
"kind": 14,
|
|
810
|
+
"detail": "Trust proxy for real IP",
|
|
811
|
+
"documentation": {
|
|
812
|
+
"value": "Specify trusted proxy addresses for real IP extraction.\n\n```nginx\nset_real_ip_from 10.0.0.0/8;\nset_real_ip_from 172.16.0.0/12;\nset_real_ip_from 192.168.0.0/16;\nreal_ip_header X-Forwarded-For;\nreal_ip_recursive on;\n```"
|
|
813
|
+
},
|
|
814
|
+
"insertText": "set_real_ip_from ${1:10.0.0.0/8};",
|
|
815
|
+
"insertTextRules": 4,
|
|
816
|
+
"sortText": "06_set_real_ip_from"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"label": "proxy_cache_key",
|
|
820
|
+
"kind": 14,
|
|
821
|
+
"detail": "Cache key definition",
|
|
822
|
+
"documentation": {
|
|
823
|
+
"value": "Define the cache key.\n\n```nginx\nproxy_cache_key $scheme$request_method$host$request_uri;\n```"
|
|
824
|
+
},
|
|
825
|
+
"insertText": "proxy_cache_key \\$scheme\\$request_method\\$host\\$request_uri;",
|
|
826
|
+
"insertTextRules": 4,
|
|
827
|
+
"sortText": "04_proxy_cache_key"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"label": "proxy_cache_bypass",
|
|
831
|
+
"kind": 14,
|
|
832
|
+
"detail": "Bypass cache condition",
|
|
833
|
+
"documentation": {
|
|
834
|
+
"value": "Define conditions to bypass cache.\n\n```nginx\nproxy_cache_bypass $http_cache_control $cookie_nocache;\n```"
|
|
835
|
+
},
|
|
836
|
+
"insertText": "proxy_cache_bypass \\$${1:http_cache_control};",
|
|
837
|
+
"insertTextRules": 4,
|
|
838
|
+
"sortText": "04_proxy_cache_bypass"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"label": "proxy_next_upstream",
|
|
842
|
+
"kind": 14,
|
|
843
|
+
"detail": "Retry on upstream failure",
|
|
844
|
+
"documentation": {
|
|
845
|
+
"value": "Specify when to pass request to next upstream server.\n\n```nginx\nproxy_next_upstream error timeout http_502 http_503;\nproxy_next_upstream_tries 3;\nproxy_next_upstream_timeout 10s;\n```"
|
|
846
|
+
},
|
|
847
|
+
"insertText": "proxy_next_upstream ${1|error,timeout,http_502,http_503,http_500,http_504,non_idempotent|};",
|
|
848
|
+
"insertTextRules": 4,
|
|
849
|
+
"sortText": "04_proxy_next_upstream"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"label": "uwsgi_pass",
|
|
853
|
+
"kind": 14,
|
|
854
|
+
"detail": "Pass to uWSGI server",
|
|
855
|
+
"documentation": {
|
|
856
|
+
"value": "Pass request to a uWSGI application server.\n\n```nginx\nlocation / {\n uwsgi_pass unix:///tmp/uwsgi.sock;\n include uwsgi_params;\n}\n```"
|
|
857
|
+
},
|
|
858
|
+
"insertText": "uwsgi_pass ${1|unix:///tmp/uwsgi.sock,127.0.0.1:8000|};",
|
|
859
|
+
"insertTextRules": 4,
|
|
860
|
+
"sortText": "05_uwsgi_pass"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"label": "grpc_pass",
|
|
864
|
+
"kind": 14,
|
|
865
|
+
"detail": "Pass to gRPC server",
|
|
866
|
+
"documentation": {
|
|
867
|
+
"value": "Pass request to a gRPC backend.\n\n```nginx\nlocation / {\n grpc_pass grpc://127.0.0.1:50051;\n}\n```"
|
|
868
|
+
},
|
|
869
|
+
"insertText": "grpc_pass ${1|grpc://,grpcs://|}${2:127.0.0.1:50051};",
|
|
870
|
+
"insertTextRules": 4,
|
|
871
|
+
"sortText": "05_grpc_pass"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"label": "internal",
|
|
875
|
+
"kind": 14,
|
|
876
|
+
"detail": "Internal location only",
|
|
877
|
+
"documentation": {
|
|
878
|
+
"value": "Mark a location as internal (only accessible via internal redirect, error_page, auth_request).\n\n```nginx\nlocation /internal {\n internal;\n proxy_pass http://backend;\n}\n```"
|
|
879
|
+
},
|
|
880
|
+
"insertText": "internal;",
|
|
881
|
+
"insertTextRules": 4,
|
|
882
|
+
"sortText": "05_internal"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"label": "stub_status location",
|
|
886
|
+
"kind": 15,
|
|
887
|
+
"detail": "Basic status monitoring",
|
|
888
|
+
"documentation": {
|
|
889
|
+
"value": "Enable stub_status for monitoring.\n\n```nginx\nlocation /nginx_status {\n stub_status;\n allow 127.0.0.1;\n deny all;\n}\n```"
|
|
890
|
+
},
|
|
891
|
+
"insertText": "location ${1:/nginx_status} {\n\tstub_status;\n\tallow ${2:127.0.0.1};\n\tdeny all;\n}",
|
|
892
|
+
"insertTextRules": 4,
|
|
893
|
+
"sortText": "07_stub_status"
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"label": "ssl_session_tickets",
|
|
897
|
+
"kind": 14,
|
|
898
|
+
"detail": "Enable/disable session tickets",
|
|
899
|
+
"documentation": {
|
|
900
|
+
"value": "Control TLS session ticket resumption.\n\n```nginx\nssl_session_tickets off; # more secure, forces session cache\n```"
|
|
901
|
+
},
|
|
902
|
+
"insertText": "ssl_session_tickets ${1|off,on|};",
|
|
903
|
+
"insertTextRules": 4,
|
|
904
|
+
"sortText": "03_ssl_session_tickets"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"label": "ssl_trusted_certificate",
|
|
908
|
+
"kind": 14,
|
|
909
|
+
"detail": "CA certs for OCSP stapling",
|
|
910
|
+
"documentation": {
|
|
911
|
+
"value": "Specify trusted CA certificate file for OCSP stapling verification.\n\n```nginx\nssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;\n```"
|
|
912
|
+
},
|
|
913
|
+
"insertText": "ssl_trusted_certificate ${1:/etc/ssl/certs/ca-certificates.crt};",
|
|
914
|
+
"insertTextRules": 4,
|
|
915
|
+
"sortText": "03_ssl_trusted_cert"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"label": "ssl_stapling_verify",
|
|
919
|
+
"kind": 14,
|
|
920
|
+
"detail": "Verify OCSP responses",
|
|
921
|
+
"documentation": {
|
|
922
|
+
"value": "Enable verification of OCSP responses.\n\n```nginx\nssl_stapling on;\nssl_stapling_verify on;\nssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;\n```"
|
|
923
|
+
},
|
|
924
|
+
"insertText": "ssl_stapling_verify ${1|on,off|};",
|
|
925
|
+
"insertTextRules": 4,
|
|
926
|
+
"sortText": "03_ssl_stapling_verify"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"label": "ssl_protocols",
|
|
930
|
+
"kind": 14,
|
|
931
|
+
"detail": "Allowed TLS protocol versions",
|
|
932
|
+
"documentation": {
|
|
933
|
+
"value": "Set allowed TLS versions.\n\n```nginx\nssl_protocols TLSv1.2 TLSv1.3;\n```"
|
|
934
|
+
},
|
|
935
|
+
"insertText": "ssl_protocols ${1:TLSv1.2 TLSv1.3};",
|
|
936
|
+
"insertTextRules": 4,
|
|
937
|
+
"sortText": "03_ssl_protocols"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"label": "ssl_ciphers",
|
|
941
|
+
"kind": 14,
|
|
942
|
+
"detail": "Allowed SSL cipher suites",
|
|
943
|
+
"documentation": {
|
|
944
|
+
"value": "Set allowed cipher suites.\n\n```nginx\nssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:...';\n```"
|
|
945
|
+
},
|
|
946
|
+
"insertText": "ssl_ciphers '${1:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256}';",
|
|
947
|
+
"insertTextRules": 4,
|
|
948
|
+
"sortText": "03_ssl_ciphers"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"label": "proxy_read_timeout",
|
|
952
|
+
"kind": 14,
|
|
953
|
+
"detail": "Proxy read timeout",
|
|
954
|
+
"documentation": {
|
|
955
|
+
"value": "Timeout for reading a response from the proxied server.\n\n```nginx\nproxy_read_timeout 60s;\n```"
|
|
956
|
+
},
|
|
957
|
+
"insertText": "proxy_read_timeout ${1:60s};",
|
|
958
|
+
"insertTextRules": 4,
|
|
959
|
+
"sortText": "04_proxy_read_timeout"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"label": "proxy_connect_timeout",
|
|
963
|
+
"kind": 14,
|
|
964
|
+
"detail": "Proxy connect timeout",
|
|
965
|
+
"documentation": {
|
|
966
|
+
"value": "Timeout for establishing connection to proxied server.\n\n```nginx\nproxy_connect_timeout 30s;\n```"
|
|
967
|
+
},
|
|
968
|
+
"insertText": "proxy_connect_timeout ${1:30s};",
|
|
969
|
+
"insertTextRules": 4,
|
|
970
|
+
"sortText": "04_proxy_connect_timeout"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"label": "proxy_buffering",
|
|
974
|
+
"kind": 14,
|
|
975
|
+
"detail": "Enable/disable proxy buffering",
|
|
976
|
+
"documentation": {
|
|
977
|
+
"value": "Control response buffering.\n\n```nginx\nproxy_buffering off; # for SSE/streaming\n```"
|
|
978
|
+
},
|
|
979
|
+
"insertText": "proxy_buffering ${1|on,off|};",
|
|
980
|
+
"insertTextRules": 4,
|
|
981
|
+
"sortText": "04_proxy_buffering"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"label": "proxy_http_version",
|
|
985
|
+
"kind": 14,
|
|
986
|
+
"detail": "Proxy HTTP version",
|
|
987
|
+
"documentation": {
|
|
988
|
+
"value": "Set HTTP version for proxied requests.\n\n```nginx\nproxy_http_version 1.1; # required for keepalive & websocket\n```"
|
|
989
|
+
},
|
|
990
|
+
"insertText": "proxy_http_version ${1|1.1,1.0|};",
|
|
991
|
+
"insertTextRules": 4,
|
|
992
|
+
"sortText": "04_proxy_http_version"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"label": "gzip_types",
|
|
996
|
+
"kind": 14,
|
|
997
|
+
"detail": "MIME types to compress",
|
|
998
|
+
"documentation": {
|
|
999
|
+
"value": "Specify MIME types to apply gzip compression.\n\n```nginx\ngzip_types text/plain text/css application/json application/javascript text/xml;\n```"
|
|
1000
|
+
},
|
|
1001
|
+
"insertText": "gzip_types ${1:text/plain text/css application/json application/javascript text/xml application/xml};",
|
|
1002
|
+
"insertTextRules": 4,
|
|
1003
|
+
"sortText": "05_gzip_types"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"label": "gzip_min_length",
|
|
1007
|
+
"kind": 14,
|
|
1008
|
+
"detail": "Minimum response size for gzip",
|
|
1009
|
+
"documentation": {
|
|
1010
|
+
"value": "Set minimum response size to trigger gzip.\n\n```nginx\ngzip_min_length 256;\n```"
|
|
1011
|
+
},
|
|
1012
|
+
"insertText": "gzip_min_length ${1:256};",
|
|
1013
|
+
"insertTextRules": 4,
|
|
1014
|
+
"sortText": "05_gzip_min_length"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"label": "gzip_vary",
|
|
1018
|
+
"kind": 14,
|
|
1019
|
+
"detail": "Add Vary: Accept-Encoding header",
|
|
1020
|
+
"documentation": {
|
|
1021
|
+
"value": "Tell caches about encoding content negotiation.\n\n```nginx\ngzip_vary on;\n```"
|
|
1022
|
+
},
|
|
1023
|
+
"insertText": "gzip_vary ${1|on,off|};",
|
|
1024
|
+
"insertTextRules": 4,
|
|
1025
|
+
"sortText": "05_gzip_vary"
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"label": "gzip_comp_level",
|
|
1029
|
+
"kind": 14,
|
|
1030
|
+
"detail": "Gzip compression level",
|
|
1031
|
+
"documentation": {
|
|
1032
|
+
"value": "Compression level 1-9 (1=fast/less, 9=slow/more).\n\n```nginx\ngzip_comp_level 5; # good balance\n```"
|
|
1033
|
+
},
|
|
1034
|
+
"insertText": "gzip_comp_level ${1:5};",
|
|
1035
|
+
"insertTextRules": 4,
|
|
1036
|
+
"sortText": "05_gzip_comp_level"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"label": "limit_req_zone",
|
|
1040
|
+
"kind": 14,
|
|
1041
|
+
"detail": "Rate limit zone definition",
|
|
1042
|
+
"documentation": {
|
|
1043
|
+
"value": "Define shared memory zone for rate limiting.\n\n```nginx\nlimit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;\n```"
|
|
1044
|
+
},
|
|
1045
|
+
"insertText": "limit_req_zone \\$binary_remote_addr zone=${1:one}:${2:10m} rate=${3:10r/s};",
|
|
1046
|
+
"insertTextRules": 4,
|
|
1047
|
+
"sortText": "05_limit_req_zone"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"label": "limit_req",
|
|
1051
|
+
"kind": 14,
|
|
1052
|
+
"detail": "Apply rate limit",
|
|
1053
|
+
"documentation": {
|
|
1054
|
+
"value": "Apply rate limiting from a defined zone.\n\n```nginx\nlimit_req zone=one burst=20 nodelay;\n```"
|
|
1055
|
+
},
|
|
1056
|
+
"insertText": "limit_req zone=${1:one} burst=${2:20} ${3|nodelay,delay=5|};",
|
|
1057
|
+
"insertTextRules": 4,
|
|
1058
|
+
"sortText": "05_limit_req"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"label": "worker_rlimit_nofile",
|
|
1062
|
+
"kind": 14,
|
|
1063
|
+
"detail": "Max open files for worker",
|
|
1064
|
+
"documentation": {
|
|
1065
|
+
"value": "Set max number of open files per worker process.\n\n```nginx\nworker_rlimit_nofile 65535;\n```"
|
|
1066
|
+
},
|
|
1067
|
+
"insertText": "worker_rlimit_nofile ${1:65535};",
|
|
1068
|
+
"insertTextRules": 4,
|
|
1069
|
+
"sortText": "00_worker_rlimit"
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"label": "multi_accept",
|
|
1073
|
+
"kind": 14,
|
|
1074
|
+
"detail": "Accept multiple connections at once",
|
|
1075
|
+
"documentation": {
|
|
1076
|
+
"value": "Enable accepting multiple connections simultaneously.\n\n```nginx\nmulti_accept on;\n```"
|
|
1077
|
+
},
|
|
1078
|
+
"insertText": "multi_accept ${1|on,off|};",
|
|
1079
|
+
"insertTextRules": 4,
|
|
1080
|
+
"sortText": "00_multi_accept"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"label": "log_format",
|
|
1084
|
+
"kind": 14,
|
|
1085
|
+
"detail": "Define custom log format",
|
|
1086
|
+
"documentation": {
|
|
1087
|
+
"value": "Define a named log format.\n\n```nginx\nlog_format main '$remote_addr - $remote_user [$time_local] \"$request\" '\n '$status $body_bytes_sent \"$http_referer\" '\n '\"$http_user_agent\"';\n```"
|
|
1088
|
+
},
|
|
1089
|
+
"insertText": "log_format ${1:main} '${2:\\$remote_addr - \\$remote_user [\\$time_local] \"\\$request\" \\$status}';",
|
|
1090
|
+
"insertTextRules": 4,
|
|
1091
|
+
"sortText": "05_log_format"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"label": "Django/Python reverse proxy",
|
|
1095
|
+
"kind": 15,
|
|
1096
|
+
"detail": "Gunicorn/uWSGI proxy",
|
|
1097
|
+
"documentation": {
|
|
1098
|
+
"value": "Reverse proxy for Django/Python apps behind Gunicorn or uWSGI.\n\n```nginx\nserver {\n listen 80;\n server_name example.com;\n location / {\n proxy_pass http://127.0.0.1:8000;\n proxy_set_header Host $host;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n }\n location /static/ {\n alias /var/www/static/;\n }\n}\n```"
|
|
1099
|
+
},
|
|
1100
|
+
"insertText": "server {\n\tlisten ${1:80};\n\tserver_name ${2:example.com};\n\n\tlocation / {\n\t\tproxy_pass http://${3:127.0.0.1:8000};\n\t\tproxy_set_header Host \\$host;\n\t\tproxy_set_header X-Real-IP \\$remote_addr;\n\t\tproxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for;\n\t\tproxy_set_header X-Forwarded-Proto \\$scheme;\n\t}\n\n\tlocation /static/ {\n\t\talias ${4:/var/www/static/};\n\t}\n}",
|
|
1101
|
+
"insertTextRules": 4,
|
|
1102
|
+
"sortText": "08_django_python"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
"label": "add_header",
|
|
1106
|
+
"kind": 14,
|
|
1107
|
+
"detail": "Add response header",
|
|
1108
|
+
"documentation": {
|
|
1109
|
+
"value": "Add custom header to response.\n\n```nginx\nadd_header X-Frame-Options SAMEORIGIN always;\n```"
|
|
1110
|
+
},
|
|
1111
|
+
"insertText": "add_header ${1:X-Frame-Options} ${2:SAMEORIGIN}${3: always};",
|
|
1112
|
+
"insertTextRules": 4,
|
|
1113
|
+
"sortText": "05"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"label": "allow",
|
|
1117
|
+
"kind": 14,
|
|
1118
|
+
"detail": "Allow IP access",
|
|
1119
|
+
"documentation": {
|
|
1120
|
+
"value": "Allow access from IP/CIDR.\n\n```nginx\nallow 192.168.1.0/24;\n```"
|
|
1121
|
+
},
|
|
1122
|
+
"insertText": "allow ${1:192.168.1.0/24};",
|
|
1123
|
+
"insertTextRules": 4,
|
|
1124
|
+
"sortText": "06"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"label": "auth_basic",
|
|
1128
|
+
"kind": 14,
|
|
1129
|
+
"detail": "HTTP Basic Auth realm",
|
|
1130
|
+
"documentation": {
|
|
1131
|
+
"value": "Enable HTTP Basic Authentication.\n\n```nginx\nauth_basic \"Restricted\";\nauth_basic_user_file /etc/nginx/.htpasswd;\n```"
|
|
1132
|
+
},
|
|
1133
|
+
"insertText": "auth_basic \"${1:Restricted}\";",
|
|
1134
|
+
"insertTextRules": 4,
|
|
1135
|
+
"sortText": "06"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"label": "auth_basic_user_file",
|
|
1139
|
+
"kind": 14,
|
|
1140
|
+
"detail": "Password file for auth",
|
|
1141
|
+
"documentation": {
|
|
1142
|
+
"value": "Path to htpasswd file.\n\n```nginx\nauth_basic_user_file /etc/nginx/.htpasswd;\n```"
|
|
1143
|
+
},
|
|
1144
|
+
"insertText": "auth_basic_user_file ${1:/etc/nginx/.htpasswd};",
|
|
1145
|
+
"insertTextRules": 4,
|
|
1146
|
+
"sortText": "06"
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"label": "client_header_timeout",
|
|
1150
|
+
"kind": 14,
|
|
1151
|
+
"detail": "Client header read timeout",
|
|
1152
|
+
"documentation": {
|
|
1153
|
+
"value": "Timeout for reading client request header.\n\n```nginx\nclient_header_timeout 60s;\n```"
|
|
1154
|
+
},
|
|
1155
|
+
"insertText": "client_header_timeout ${1:60s};",
|
|
1156
|
+
"insertTextRules": 4,
|
|
1157
|
+
"sortText": "05"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"label": "default_type",
|
|
1161
|
+
"kind": 14,
|
|
1162
|
+
"detail": "Default MIME type",
|
|
1163
|
+
"documentation": {
|
|
1164
|
+
"value": "Set default MIME type for responses.\n\n```nginx\ndefault_type application/octet-stream;\n```"
|
|
1165
|
+
},
|
|
1166
|
+
"insertText": "default_type ${1:application/octet-stream};",
|
|
1167
|
+
"insertTextRules": 4,
|
|
1168
|
+
"sortText": "05"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"label": "deny",
|
|
1172
|
+
"kind": 14,
|
|
1173
|
+
"detail": "Deny IP access",
|
|
1174
|
+
"documentation": {
|
|
1175
|
+
"value": "Deny access from IP/CIDR.\n\n```nginx\ndeny all;\n```"
|
|
1176
|
+
},
|
|
1177
|
+
"insertText": "deny ${1:all};",
|
|
1178
|
+
"insertTextRules": 4,
|
|
1179
|
+
"sortText": "06"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"label": "events",
|
|
1183
|
+
"kind": 14,
|
|
1184
|
+
"detail": "Events block",
|
|
1185
|
+
"documentation": {
|
|
1186
|
+
"value": "Events context.\n\n```nginx\nevents { worker_connections 1024; }\n```"
|
|
1187
|
+
},
|
|
1188
|
+
"insertText": "events {\n\tworker_connections ${1:1024};\n}",
|
|
1189
|
+
"insertTextRules": 4,
|
|
1190
|
+
"sortText": "00"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"label": "fastcgi_index",
|
|
1194
|
+
"kind": 14,
|
|
1195
|
+
"detail": "FastCGI index file",
|
|
1196
|
+
"documentation": {
|
|
1197
|
+
"value": "Set index file for FastCGI.\n\n```nginx\nfastcgi_index index.php;\n```"
|
|
1198
|
+
},
|
|
1199
|
+
"insertText": "fastcgi_index ${1:index.php};",
|
|
1200
|
+
"insertTextRules": 4,
|
|
1201
|
+
"sortText": "05"
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"label": "fastcgi_param",
|
|
1205
|
+
"kind": 14,
|
|
1206
|
+
"detail": "FastCGI parameter",
|
|
1207
|
+
"documentation": {
|
|
1208
|
+
"value": "Set FastCGI parameter.\n\n```nginx\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n```"
|
|
1209
|
+
},
|
|
1210
|
+
"insertText": "fastcgi_param ${1:SCRIPT_FILENAME} ${2:\\$document_root\\$fastcgi_script_name};",
|
|
1211
|
+
"insertTextRules": 4,
|
|
1212
|
+
"sortText": "05"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"label": "geo",
|
|
1216
|
+
"kind": 14,
|
|
1217
|
+
"detail": "Geo mapping block",
|
|
1218
|
+
"documentation": {
|
|
1219
|
+
"value": "Map client IP to variable.\n\n```nginx\ngeo $geo { default 0; 10.0.0.0/8 1; }\n```"
|
|
1220
|
+
},
|
|
1221
|
+
"insertText": "geo \\$${1:geo} {\n\tdefault ${2:0};\n\t${3:10.0.0.0/8} ${4:1};\n}",
|
|
1222
|
+
"insertTextRules": 4,
|
|
1223
|
+
"sortText": "05"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"label": "gzip_proxied",
|
|
1227
|
+
"kind": 14,
|
|
1228
|
+
"detail": "Gzip for proxied requests",
|
|
1229
|
+
"documentation": {
|
|
1230
|
+
"value": "Enable gzip for proxied responses.\n\n```nginx\ngzip_proxied any;\n```"
|
|
1231
|
+
},
|
|
1232
|
+
"insertText": "gzip_proxied ${1|any,off,expired,no-cache,no-store,private,no_last_modified,no_etag,auth|};",
|
|
1233
|
+
"insertTextRules": 4,
|
|
1234
|
+
"sortText": "05"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"label": "http",
|
|
1238
|
+
"kind": 14,
|
|
1239
|
+
"detail": "HTTP block",
|
|
1240
|
+
"documentation": {
|
|
1241
|
+
"value": "HTTP context.\n\n```nginx\nhttp { ... }\n```"
|
|
1242
|
+
},
|
|
1243
|
+
"insertText": "http {\n\t$0\n}",
|
|
1244
|
+
"insertTextRules": 4,
|
|
1245
|
+
"sortText": "00"
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
"label": "if",
|
|
1249
|
+
"kind": 14,
|
|
1250
|
+
"detail": "Conditional directive",
|
|
1251
|
+
"documentation": {
|
|
1252
|
+
"value": "Conditional (use with caution in location).\n\n```nginx\nif ($host = old.com) { return 301 https://new.com$request_uri; }\n```"
|
|
1253
|
+
},
|
|
1254
|
+
"insertText": "if (${1:\\$host = example.com}) {\n\t${2:return 301 https://new.com\\$request_uri;}\n}",
|
|
1255
|
+
"insertTextRules": 4,
|
|
1256
|
+
"sortText": "05"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"label": "keepalive_requests",
|
|
1260
|
+
"kind": 14,
|
|
1261
|
+
"detail": "Max requests per keepalive",
|
|
1262
|
+
"documentation": {
|
|
1263
|
+
"value": "Max requests per keepalive connection.\n\n```nginx\nkeepalive_requests 1000;\n```"
|
|
1264
|
+
},
|
|
1265
|
+
"insertText": "keepalive_requests ${1:1000};",
|
|
1266
|
+
"insertTextRules": 4,
|
|
1267
|
+
"sortText": "05"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"label": "limit_conn",
|
|
1271
|
+
"kind": 14,
|
|
1272
|
+
"detail": "Connection limit",
|
|
1273
|
+
"documentation": {
|
|
1274
|
+
"value": "Limit connections per key.\n\n```nginx\nlimit_conn addr 10;\n```"
|
|
1275
|
+
},
|
|
1276
|
+
"insertText": "limit_conn ${1:addr} ${2:10};",
|
|
1277
|
+
"insertTextRules": 4,
|
|
1278
|
+
"sortText": "05"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"label": "limit_conn_zone",
|
|
1282
|
+
"kind": 14,
|
|
1283
|
+
"detail": "Connection limit zone",
|
|
1284
|
+
"documentation": {
|
|
1285
|
+
"value": "Define shared memory for conn limiting.\n\n```nginx\nlimit_conn_zone $binary_remote_addr zone=addr:10m;\n```"
|
|
1286
|
+
},
|
|
1287
|
+
"insertText": "limit_conn_zone \\$binary_remote_addr zone=${1:addr}:${2:10m};",
|
|
1288
|
+
"insertTextRules": 4,
|
|
1289
|
+
"sortText": "05"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"label": "location",
|
|
1293
|
+
"kind": 14,
|
|
1294
|
+
"detail": "Location block",
|
|
1295
|
+
"documentation": {
|
|
1296
|
+
"value": "Location matching block.\n\n```nginx\nlocation /path { ... }\n```"
|
|
1297
|
+
},
|
|
1298
|
+
"insertText": "location ${1:/} {\n\t$0\n}",
|
|
1299
|
+
"insertTextRules": 4,
|
|
1300
|
+
"sortText": "02"
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"label": "mail",
|
|
1304
|
+
"kind": 14,
|
|
1305
|
+
"detail": "Mail proxy block",
|
|
1306
|
+
"documentation": {
|
|
1307
|
+
"value": "Mail proxy context (IMAP/POP3/SMTP)."
|
|
1308
|
+
},
|
|
1309
|
+
"insertText": "mail {\n\t$0\n}",
|
|
1310
|
+
"insertTextRules": 4,
|
|
1311
|
+
"sortText": "00"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"label": "map",
|
|
1315
|
+
"kind": 14,
|
|
1316
|
+
"detail": "Map directive block",
|
|
1317
|
+
"documentation": {
|
|
1318
|
+
"value": "Map input to output variable.\n\n```nginx\nmap $uri $new { /old /new; }\n```"
|
|
1319
|
+
},
|
|
1320
|
+
"insertText": "map \\$${1:uri} \\$${2:new} {\n\t${3:default} ${4:0};\n\t${5:~pattern} ${6:value};\n}",
|
|
1321
|
+
"insertTextRules": 4,
|
|
1322
|
+
"sortText": "05"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"label": "open_file_cache",
|
|
1326
|
+
"kind": 14,
|
|
1327
|
+
"detail": "Open file cache",
|
|
1328
|
+
"documentation": {
|
|
1329
|
+
"value": "Cache file descriptors and metadata.\n\n```nginx\nopen_file_cache max=1000 inactive=20s;\n```"
|
|
1330
|
+
},
|
|
1331
|
+
"insertText": "open_file_cache max=${1:1000} inactive=${2:20s};",
|
|
1332
|
+
"insertTextRules": 4,
|
|
1333
|
+
"sortText": "05"
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
"label": "proxy_buffer_size",
|
|
1337
|
+
"kind": 14,
|
|
1338
|
+
"detail": "Proxy buffer size",
|
|
1339
|
+
"documentation": {
|
|
1340
|
+
"value": "Buffer size for first part of proxied response.\n\n```nginx\nproxy_buffer_size 4k;\n```"
|
|
1341
|
+
},
|
|
1342
|
+
"insertText": "proxy_buffer_size ${1:4k};",
|
|
1343
|
+
"insertTextRules": 4,
|
|
1344
|
+
"sortText": "04"
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"label": "proxy_cache_path",
|
|
1348
|
+
"kind": 14,
|
|
1349
|
+
"detail": "Cache storage path",
|
|
1350
|
+
"documentation": {
|
|
1351
|
+
"value": "Define proxy cache path and settings.\n\n```nginx\nproxy_cache_path /var/cache/nginx levels=1:2 keys_zone=cache:10m max_size=1g;\n```"
|
|
1352
|
+
},
|
|
1353
|
+
"insertText": "proxy_cache_path ${1:/var/cache/nginx} levels=${2:1:2} keys_zone=${3:cache}:${4:10m} max_size=${5:1g};",
|
|
1354
|
+
"insertTextRules": 4,
|
|
1355
|
+
"sortText": "04"
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"label": "proxy_cache_valid",
|
|
1359
|
+
"kind": 14,
|
|
1360
|
+
"detail": "Cache validity duration",
|
|
1361
|
+
"documentation": {
|
|
1362
|
+
"value": "Set cache time per status.\n\n```nginx\nproxy_cache_valid 200 302 10m;\n```"
|
|
1363
|
+
},
|
|
1364
|
+
"insertText": "proxy_cache_valid ${1:200} ${2:10m};",
|
|
1365
|
+
"insertTextRules": 4,
|
|
1366
|
+
"sortText": "04"
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"label": "proxy_cookie_domain",
|
|
1370
|
+
"kind": 14,
|
|
1371
|
+
"detail": "Rewrite cookie domain",
|
|
1372
|
+
"documentation": {
|
|
1373
|
+
"value": "Change domain in Set-Cookie from proxy."
|
|
1374
|
+
},
|
|
1375
|
+
"insertText": "proxy_cookie_domain ${1:backend.example.com} ${2:example.com};",
|
|
1376
|
+
"insertTextRules": 4,
|
|
1377
|
+
"sortText": "04"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"label": "proxy_cookie_path",
|
|
1381
|
+
"kind": 14,
|
|
1382
|
+
"detail": "Rewrite cookie path",
|
|
1383
|
+
"documentation": {
|
|
1384
|
+
"value": "Change path in Set-Cookie from proxy."
|
|
1385
|
+
},
|
|
1386
|
+
"insertText": "proxy_cookie_path ${1:/app/} ${2:/};",
|
|
1387
|
+
"insertTextRules": 4,
|
|
1388
|
+
"sortText": "04"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"label": "proxy_send_timeout",
|
|
1392
|
+
"kind": 14,
|
|
1393
|
+
"detail": "Proxy send timeout",
|
|
1394
|
+
"documentation": {
|
|
1395
|
+
"value": "Timeout for sending request to proxied server.\n\n```nginx\nproxy_send_timeout 60s;\n```"
|
|
1396
|
+
},
|
|
1397
|
+
"insertText": "proxy_send_timeout ${1:60s};",
|
|
1398
|
+
"insertTextRules": 4,
|
|
1399
|
+
"sortText": "04"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"label": "resolver",
|
|
1403
|
+
"kind": 14,
|
|
1404
|
+
"detail": "DNS resolver",
|
|
1405
|
+
"documentation": {
|
|
1406
|
+
"value": "Configure DNS resolver.\n\n```nginx\nresolver 8.8.8.8 8.8.4.4 valid=300s;\n```"
|
|
1407
|
+
},
|
|
1408
|
+
"insertText": "resolver ${1:8.8.8.8 8.8.4.4} valid=${2:300s};",
|
|
1409
|
+
"insertTextRules": 4,
|
|
1410
|
+
"sortText": "05"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"label": "return",
|
|
1414
|
+
"kind": 14,
|
|
1415
|
+
"detail": "Return response/redirect",
|
|
1416
|
+
"documentation": {
|
|
1417
|
+
"value": "Return status code or redirect.\n\n```nginx\nreturn 301 https://$host$request_uri;\n```"
|
|
1418
|
+
},
|
|
1419
|
+
"insertText": "return ${1|301,302,200,403,404|} ${2:https://\\$host\\$request_uri};",
|
|
1420
|
+
"insertTextRules": 4,
|
|
1421
|
+
"sortText": "05"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"label": "server",
|
|
1425
|
+
"kind": 14,
|
|
1426
|
+
"detail": "Server block",
|
|
1427
|
+
"documentation": {
|
|
1428
|
+
"value": "Virtual server block.\n\n```nginx\nserver { listen 80; server_name example.com; }\n```"
|
|
1429
|
+
},
|
|
1430
|
+
"insertText": "server {\n\tlisten ${1:80};\n\tserver_name ${2:example.com};\n\t$0\n}",
|
|
1431
|
+
"insertTextRules": 4,
|
|
1432
|
+
"sortText": "01"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"label": "set",
|
|
1436
|
+
"kind": 14,
|
|
1437
|
+
"detail": "Set variable",
|
|
1438
|
+
"documentation": {
|
|
1439
|
+
"value": "Set a variable value.\n\n```nginx\nset $var value;\n```"
|
|
1440
|
+
},
|
|
1441
|
+
"insertText": "set \\$${1:variable} ${2:value};",
|
|
1442
|
+
"insertTextRules": 4,
|
|
1443
|
+
"sortText": "05"
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"label": "ssl_prefer_server_ciphers",
|
|
1447
|
+
"kind": 14,
|
|
1448
|
+
"detail": "Prefer server ciphers",
|
|
1449
|
+
"documentation": {
|
|
1450
|
+
"value": "Prefer server cipher order.\n\n```nginx\nssl_prefer_server_ciphers on;\n```"
|
|
1451
|
+
},
|
|
1452
|
+
"insertText": "ssl_prefer_server_ciphers ${1|on,off|};",
|
|
1453
|
+
"insertTextRules": 4,
|
|
1454
|
+
"sortText": "03"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"label": "ssl_session_cache",
|
|
1458
|
+
"kind": 14,
|
|
1459
|
+
"detail": "SSL session cache",
|
|
1460
|
+
"documentation": {
|
|
1461
|
+
"value": "Configure SSL session cache.\n\n```nginx\nssl_session_cache shared:SSL:10m;\n```"
|
|
1462
|
+
},
|
|
1463
|
+
"insertText": "ssl_session_cache shared:${1:SSL}:${2:10m};",
|
|
1464
|
+
"insertTextRules": 4,
|
|
1465
|
+
"sortText": "03"
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"label": "ssl_session_timeout",
|
|
1469
|
+
"kind": 14,
|
|
1470
|
+
"detail": "SSL session timeout",
|
|
1471
|
+
"documentation": {
|
|
1472
|
+
"value": "Timeout for SSL session reuse.\n\n```nginx\nssl_session_timeout 1d;\n```"
|
|
1473
|
+
},
|
|
1474
|
+
"insertText": "ssl_session_timeout ${1:1d};",
|
|
1475
|
+
"insertTextRules": 4,
|
|
1476
|
+
"sortText": "03"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"label": "ssl_stapling",
|
|
1480
|
+
"kind": 14,
|
|
1481
|
+
"detail": "Enable OCSP stapling",
|
|
1482
|
+
"documentation": {
|
|
1483
|
+
"value": "Enable OCSP stapling.\n\n```nginx\nssl_stapling on;\n```"
|
|
1484
|
+
},
|
|
1485
|
+
"insertText": "ssl_stapling ${1|on,off|};",
|
|
1486
|
+
"insertTextRules": 4,
|
|
1487
|
+
"sortText": "03"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"label": "stream",
|
|
1491
|
+
"kind": 14,
|
|
1492
|
+
"detail": "Stream block",
|
|
1493
|
+
"documentation": {
|
|
1494
|
+
"value": "TCP/UDP proxy context.\n\n```nginx\nstream { ... }\n```"
|
|
1495
|
+
},
|
|
1496
|
+
"insertText": "stream {\n\t$0\n}",
|
|
1497
|
+
"insertTextRules": 4,
|
|
1498
|
+
"sortText": "00"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"label": "stub_status",
|
|
1502
|
+
"kind": 14,
|
|
1503
|
+
"detail": "Enable stub status",
|
|
1504
|
+
"documentation": {
|
|
1505
|
+
"value": "Enable basic status info.\n\n```nginx\nstub_status;\n```"
|
|
1506
|
+
},
|
|
1507
|
+
"insertText": "stub_status;",
|
|
1508
|
+
"insertTextRules": 4,
|
|
1509
|
+
"sortText": "07"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"label": "sub_filter",
|
|
1513
|
+
"kind": 14,
|
|
1514
|
+
"detail": "Response body substitution",
|
|
1515
|
+
"documentation": {
|
|
1516
|
+
"value": "Replace string in response body."
|
|
1517
|
+
},
|
|
1518
|
+
"insertText": "sub_filter ${1:old_text} ${2:new_text};",
|
|
1519
|
+
"insertTextRules": 4,
|
|
1520
|
+
"sortText": "05"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"label": "tcp_nodelay",
|
|
1524
|
+
"kind": 14,
|
|
1525
|
+
"detail": "TCP_NODELAY option",
|
|
1526
|
+
"documentation": {
|
|
1527
|
+
"value": "Enable TCP_NODELAY.\n\n```nginx\ntcp_nodelay on;\n```"
|
|
1528
|
+
},
|
|
1529
|
+
"insertText": "tcp_nodelay ${1|on,off|};",
|
|
1530
|
+
"insertTextRules": 4,
|
|
1531
|
+
"sortText": "05"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
"label": "tcp_nopush",
|
|
1535
|
+
"kind": 14,
|
|
1536
|
+
"detail": "TCP_NOPUSH/TCP_CORK",
|
|
1537
|
+
"documentation": {
|
|
1538
|
+
"value": "Enable TCP_NOPUSH.\n\n```nginx\ntcp_nopush on;\n```"
|
|
1539
|
+
},
|
|
1540
|
+
"insertText": "tcp_nopush ${1|on,off|};",
|
|
1541
|
+
"insertTextRules": 4,
|
|
1542
|
+
"sortText": "05"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"label": "types",
|
|
1546
|
+
"kind": 14,
|
|
1547
|
+
"detail": "MIME types block",
|
|
1548
|
+
"documentation": {
|
|
1549
|
+
"value": "Define MIME type mappings."
|
|
1550
|
+
},
|
|
1551
|
+
"insertText": "types {\n\t${1:text/html} ${2:html htm};\n}",
|
|
1552
|
+
"insertTextRules": 4,
|
|
1553
|
+
"sortText": "05"
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"label": "upstream",
|
|
1557
|
+
"kind": 14,
|
|
1558
|
+
"detail": "Upstream block",
|
|
1559
|
+
"documentation": {
|
|
1560
|
+
"value": "Define upstream server group.\n\n```nginx\nupstream backend { server 127.0.0.1:8080; }\n```"
|
|
1561
|
+
},
|
|
1562
|
+
"insertText": "upstream ${1:backend} {\n\tserver ${2:127.0.0.1:8080};\n}",
|
|
1563
|
+
"insertTextRules": 4,
|
|
1564
|
+
"sortText": "02"
|
|
762
1565
|
}
|
|
763
1566
|
]
|
|
764
|
-
}
|
|
1567
|
+
}
|