Cursor rule
.cursor/rules/http-headers.mdc[object Object]
Cursor rules
Quality
43/100
Scores the file, not the repository.Length
855 words
3 headings · 0 code blocksRepository
2
— · pushed 306 days agoLast changed
3 days ago
First indexed 3 days ago.123456# Standard Headers78pattern: Accept9description: Specify the response format accepted by the client.10when:11 - request: true12 - required: false13 - response: false14 - methods: ALL15examples:16 - 'Accept: application/vnd.guardia.v1+json'1718pattern: Accept-Language19description: Specify the client's preferred language.20when:21 - request: true22 - required: false23 - response: false24 - methods: ALL25examples:26 - 'Accept-Language: pt-BR'27 - 'Accept-Language: es'28 - 'Accept-Language: en'29actions:30 - include:31 - Use `en` as default value.3233pattern: Content-Language34description: Specify the response language.35when:36 - request: false37 - response: true38 - condition: always39 - methods: ALL40 - status codes: ALL41examples:42 - 'Content-Language: pt-BR'43 - 'Content-Language: es'44 - 'Content-Language: en'45actions:46 - include:47 - Use same value requested through the Accept-Language header of the request.4849pattern: Cache-Control50description: Controls caching behavior for HTTP responses.51when:52 - request: false53 - response: true54 - required: true55 - condition: always56 - methods: POST, PATCH57 - status codes: 2xx58examples:59 - 'Cache-Control: public, max-age=<timestamp>'60 - 'Cache-Control: private, max-age=<timestamp>'61 - 'Cache-Control: no-store'62actions:63 - include:64 - Use `no-store` for sensitive data or error response.65 - Use includes `public` for all success response that not return sentitive data and cache can be shared.66 - Use includes `private` for all success response that not return sentitive data and cache can not be shared.67 - Use `max-age=<timestamp>` for all success response that no return sentitive data.68 - validate:69 - If using `max-age`, value must be numeric in seconds.70 - follow:71 - ./docs/specifications/restful/http-headers.md#cache-control72 - RFC 9111, Section 5.2 Cache-Control7374pattern: Link75description: Provides pagination or resource navigation links using HATEOAS.76when:77 - request: false78 - response: true79 - required: true80 - condition: when listing or navigating entities81 - methods: POST, PATCH82 - status codes: 2xx83examples:84 - link:\85 <https://{tenant_id}.guardia.finance/api/v1/ledgers?page_token={first_page_token}>; rel="first",\86 <https://{tenant_id}.guardia.finance/api/v1/ledgers?page_token={previous_page_token}>; rel="previous",\87 <https://{tenant_id}.guardia.finance/api/v1/ledgers?page_token={next_page_token}>; rel="next",\88 <https://{tenant_id}.guardia.finance/api/v1/ledgers?page_token={last_page_token}>; rel="last"8990actions:91 - include: Use HATEOAS links when listing or navigating entities.92 - follow: https://restfulapi.net/hateoas9394pattern: Idempotency-Key95description: Identifies a request that should not be processed more than once.96when:97 - request: true98 - required: true99 - response: true100 - required: true101 - condition: when success response102 - methods: POST, PATCH103 - status codes: 2xx104examples:105 - 'Idempotency-Key: 5f47ab1e-7b0a-4bfb-a2a4-623bd242b31c'106actions:107 - validate:108 - Ensure uniqueness for sensitive methods (e.g., POST, PATCH).109 - follow:110 - ./docs/specifications/restful/http-headers.md#idempotency-key111 - ./docs/specifications/idempotency.md#implementação-em-apis112 - draft-ietf-httpapi-idempotency-key-header-01, Internet Engineering Task Force (IETF), 8 May 2022.113114pattern: Content-Digest115description: Hash of the payload used to guarantee integrity for idempotent requests.116when:117 - request: false118 - response: true119 - required: true120 - condition: when received Idempotency-Key in request121 - methods: POST, PATCH122 - status codes: 2xx123examples:124 - 'Content-Digest: sha-256=<hash>'125actions:126 - validate:127 - Hash must be a sha-265 valid.128 - Hash must match the actual request body.129 - follow:130 - ./docs/specifications/restful/http-headers.md#idempotency-key131 - ./docs/specifications/idempotency.md#implementação-em-apis132 - draft-ietf-httpapi-idempotency-key-header-01, Internet Engineering Task Force (IETF), 8 May 2022.133134pattern: Last-Modified135description: Indicates the last modification date of a given entity.136when:137 - request: false138 - response: true139 - required: true140 - condition: only if received Idempotency-Key in request141 - methods: POST, PATCH142 - status codes: 2xx143examples:144 - 'Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT'145actions:146 - validate:147 - Must follow date format.148 - follow:149 - ./docs/specifications/restful/http-headers.md#idempotency-key150 - ./docs/specifications/idempotency.md#implementação-em-apis151 - draft-ietf-httpapi-idempotency-key-header-01, Internet Engineering Task Force (IETF), 8 May 2022.152 - RFC 7232, Section 2.2. Last-Modified153154pattern: Retry-After155description: Informs how long (in seconds) the client should wait before retrying after a 429 error.156when:157 - request: false158 - response: true159 - required: true160 - condition: when return 429161 - methods: ALL162 - status codes: 429163examples:164 - 'Retry-After: <timestamp>'165actions:166 - validate:167 - Must be a positive integer in seconds.168 - follow:169 - ./docs/specifications/restful/http-headers.md#retry-after170171# Custom Headers (X-Grd-* by Guardia)172173pattern: X-Grd-Debug174description: Enables extended debug information in the response payload.175when:176 - request: false177 - response: true178 - required: true179 - condition: only if received X-Grd-Debug in request180 - methods: ALL181 - status codes: ALL182examples:183 - 'X-Grd-Debug: true'184actions:185 - validate:186 - Only accepts "true" or "false" (case-insensitive). Other values trigger a 400 error.187 - security:188 - Apply limits — 10 requests per minute, minimum 1-minute interval, 10-minute max duration.189 - follow:190 - ./docs/specifications/http-response-payloads.md#em-caso-de-debug191 - ./docs/specifications/restful/http-headers.md#x-grd-debug192193pattern: X-Grd-Trace-Id194description: Unique request identifier generated by Guardia infrastructure.195when:196 - request: false197 - response: true198 - required: true199 - condition: always200 - methods: ALL201 - status codes: ALL202examples:203 - 'X-Grd-Trace-Id: <uuid>'204actions:205 - validate:206 - Must be a valid UUIDv7 (RFC 9562).207 - enforce:208 - Always include in all responses, including errors.209 - follow:210 - ./docs/specifications/restful/http-headers.md#x-grd-trace-id211212pattern: X-Grd-Correlation-Id213description: Correlates external calls in a distributed trace context.214when:215 - request: true216 - required: false217 - response: true218 - required: true219 - condition: only if received X-Grd-Correlation-Id in request220 - methods: ALL221 - status codes: ALL222examples:223 - 'X-Grd-Correlation-Id: 018f74a6-e3b2-70cc-bf24-8a4b012f5f3e'224actions:225 - enforce: if-present, propagate to logs and events.226 - validate: If invalid, ignore and generate a new one.227228# Security Considerations229230pattern: header validation231description: General rules for header validation.232actions:233 - sanitize: Headers must never contain PII, secrets, credentials, or sensitive business data.234 - enforce: Limit maximum header size and total number per request.235 - isolate: Custom headers prefixed with `X-Grd-*` must be validated in isolation.236 - follow: RFC 9110 and OWASP secure headers best practices.237238239240241242243
Also in guardiatechnology/.github
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| guardiatechnology/.github.cursor/rules/http-sorting.mdc · 2 | Cursor rules | no sections | 30/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/accounting-specs.mdc · 2 | Cursor rules | no sections | 30/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/business-rules-and-specs-best-practices.mdc · 2 | Cursor rules | styledo-not | 65/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/clsx-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/docusaurus-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/http-pagination.mdc · 2 | Cursor rules | no sections | 34/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/http-response-payloads.mdc · 2 | Cursor rules | no sections | 34/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/http-status-codes.mdc · 2 | Cursor rules | no sections | 30/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/json-schema-ref-parser-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/panzoom-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/prism-react-renderer-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/react-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/react-helmet-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/styled-components-best-practices.mdc · 2 | Cursor rules | no sections | 16/100 | 3 days ago | |
| guardiatechnology/.github.cursor/rules/typescript-best-practices.mdc · 2 | Cursor rules | style | 20/100 | 3 days ago |
Diff against .cursor/rules/http-sorting.mdc Diff against .cursor/rules/accounting-specs.mdc Diff against .cursor/rules/business-rules-and-specs-best-practices.mdc Diff against .cursor/rules/clsx-best-practices.mdc Diff against .cursor/rules/docusaurus-best-practices.mdc Diff against .cursor/rules/http-pagination.mdc Diff against .cursor/rules/http-response-payloads.mdc Diff against .cursor/rules/http-status-codes.mdc Diff against .cursor/rules/json-schema-ref-parser-best-practices.mdc Diff against .cursor/rules/panzoom-best-practices.mdc Diff against .cursor/rules/prism-react-renderer-best-practices.mdc Diff against .cursor/rules/react-best-practices.mdc Diff against .cursor/rules/react-helmet-best-practices.mdc Diff against .cursor/rules/styled-components-best-practices.mdc Diff against .cursor/rules/typescript-best-practices.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
