File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ describe('API Routes', () => {
334
334
const res = await request ( app ) . get ( '/v1/technologies' ) ;
335
335
expect ( res . headers [ 'access-control-allow-origin' ] ) . toEqual ( '*' ) ;
336
336
expect ( res . headers [ 'content-type' ] ) . toContain ( 'application/json' ) ;
337
- expect ( res . headers [ 'cache-control' ] ) . toContain ( 'no-cache ' ) ;
337
+ expect ( res . headers [ 'cache-control' ] ) . toContain ( 'public ' ) ;
338
338
} ) ;
339
339
340
340
it ( 'should include ETag headers for caching' , async ( ) => {
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ const setCORSHeaders = (res) => {
26
26
const setCommonHeaders = ( res ) => {
27
27
setCORSHeaders ( res ) ;
28
28
res . setHeader ( 'Content-Type' , 'application/json' ) ;
29
- res . setHeader ( 'Cache-Control' , 'no-cache, no-store, must-revalidate' ) ;
30
- res . setHeader ( 'Pragma' , 'no-cache' ) ;
31
- res . setHeader ( 'Expires' , '0' ) ;
29
+ res . setHeader ( 'Cache-Control' , 'public, max-age=21600' ) ;
32
30
res . setHeader ( 'Timing-Allow-Origin' , '*' ) ;
33
31
} ;
34
32
Original file line number Diff line number Diff line change @@ -13,26 +13,25 @@ provider "google" {
13
13
14
14
resource "google_api_gateway_api" "api" {
15
15
provider = google- beta
16
- api_id = " api-gw-dev "
17
- display_name = " The dev API Gateway"
16
+ api_id = " reports-api "
17
+ display_name = " Reports API Gateway"
18
18
project = var. project
19
19
}
20
20
21
21
# A Configuration, consisting of an OpenAPI specification
22
22
resource "google_api_gateway_api_config" "api_config" {
23
23
provider = google- beta
24
24
api = google_api_gateway_api. api . api_id
25
- api_config_id_prefix = " api "
25
+ api_config_id_prefix = " reports_api_config_dev "
26
26
project = var. project
27
- display_name = " The dev Config"
27
+ display_name = " Reports API Config DEV "
28
28
openapi_documents {
29
29
document {
30
30
path = " spec.yaml"
31
31
contents = base64encode (<<- EOF
32
32
swagger: "2.0"
33
33
info:
34
- title: reports-backend-api
35
- description: API tech report
34
+ title: reports_api_config_dev
36
35
version: 1.0.0
37
36
schemes:
38
37
- https
@@ -116,8 +115,8 @@ resource "google_api_gateway_gateway" "gateway" {
116
115
project = var. project
117
116
region = var. region
118
117
api_config = google_api_gateway_api_config. api_config . id
119
- gateway_id = " dev-gw "
120
- display_name = " devApi Gateway"
118
+ gateway_id = " reports-dev "
119
+ display_name = " Reports API Gateway DEV "
121
120
labels = {
122
121
owner = " tech_report_api"
123
122
environment = var.environment
You can’t perform that action at this time.
0 commit comments