Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incident: LPWA error in scanning (DEV network) - Query w/ lang=en / Leaflet in lang=de #1107

Closed
jaravan1 opened this issue Dec 12, 2022 · 2 comments

Comments

@jaravan1
Copy link

ePI v1.6.1-patch2
DEV network

Scanning with LPWA ends up with error:
image

Because below query fails:

https://epidev.takeda.com/leaflets/dev.epi?leaflet_type=leaflet&lang=en&gtin=05060147024098&expiry=30%20-%20Apr%20-%202024&batch=M0001

image

The leaflet exists in lang=de:

https://epidev.takeda.com/leaflets/dev.epi?leaflet_type=leaflet&lang=de&gtin=05060147024098&expiry=30%20-%20Apr%20-%202024&batch=M0001

but the query from LPWA is only performed in lang=en and since it does not find the leaflet in EN it returns an error.

@jaravan1
Copy link
Author

jaravan1 commented Dec 13, 2022

In order for LPWA to function properly, CORS needs to be enabled for API Hub proxy/nginx/ALB. More specifically, a preflight OPTIONS call is performed from browser when using LPWA and the reply needs to include the following values in HEADER:

{
            "Content-Type" : "application/json",
            "Access-Control-Allow-Headers" : "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Content-Type, Content-Length, X-Content-Length, Access-Control-Allow-Origin, User-Agent, authorization, Authorization, x-signature, token, epiProtocolVersion, getProductData",
            "Access-Control-Allow-Origin": "*",
            "Access-Control-Allow-Methods": "OPTIONS,POST,PUT,GET,PATCH,DELETE"
}

After configuring this the scan is successful in DEV (dev.epi domain):

image

image

@jaravan1
Copy link
Author

Will be resolved with #1143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant