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

OPTIONS requests to /api/* return HTTP 500, causing CORS failures #25775

Closed
yolabingo opened this issue Aug 11, 2023 · 3 comments · Fixed by #25854
Closed

OPTIONS requests to /api/* return HTTP 500, causing CORS failures #25775

yolabingo opened this issue Aug 11, 2023 · 3 comments · Fixed by #25854
Assignees
Labels
OKR : Customer Success Owned by Arno OKR : Customer Support Owned by Scott QA : Approved Release : 22.03.9 Included in LTS patch release 22.03.9 Release : 23.01.5 Included in LTS patch release 23.01.5 Release : 23.09.6 Release Template Builder Team : Bug Fixers Type : Defect

Comments

@yolabingo
Copy link
Contributor

yolabingo commented Aug 11, 2023

Parent Issue

No response

Problem Statement

EDIT: this impacts other apis, not just /api/content

These return HTTP 500:

curl -X OPTIONS --head https://demo.dotcms.com/api/v1/appconfiguration
curl -X OPTIONS --head https://demo.dotcms.com/api/v1/contenttype

but /api/v1/graphql is ok.

OPTIONS requests to /api/content/* return a HTTP 500 error.

Browsers making client-side fetch api and XHR requests may enforce CORS restrictions, which require a valid server response to these OPTIONS requests. This means it is not currently possible to make client-side javascript requests to /api/content/* from web browsers.

See the Slack link below for more details

Steps to Reproduce

curl -X OPTIONS --head https://demo.dotcms.com/api/content/id/574f0aec-185a-4160-9c17-6d037b298318/

Acceptance Criteria

OPTIONS requests to /api/content/* return proper CORS headers

dotCMS Version

22.06 LTS and later - not sure which agile release first does this

the issue is not present in 21.06 LTS

Proposed Objective

Core Features

Proposed Priority

Priority 1 - Show Stopper

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

Cloud customer reported this issue https://dotcms.zendesk.com/agent/tickets/112877

See this Slack post for more details https://dotcms.slack.com/archives/C028Z3R2D/p1691775252548639

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@yolabingo yolabingo changed the title OPTIONS requests to /api/content return HTTP 500, causing CORS failures OPTIONS requests to /api/* return HTTP 500, causing CORS failures Aug 11, 2023
@erickgonzalez
Copy link
Contributor

This is broken due the remove of jaxws libs #24843

erickgonzalez added a commit that referenced this issue Aug 11, 2023
@erickgonzalez erickgonzalez self-assigned this Aug 11, 2023
erickgonzalez added a commit that referenced this issue Aug 14, 2023
@erickgonzalez
Copy link
Contributor

Let's add this instead of the old libs implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.3'

@erickgonzalez erickgonzalez linked a pull request Aug 22, 2023 that will close this issue
@erickgonzalez erickgonzalez added Release : 23.01.5 Included in LTS patch release 23.01.5 Release : 22.03.9 Included in LTS patch release 22.03.9 and removed Triage labels Aug 22, 2023
@erickgonzalez erickgonzalez reopened this Aug 25, 2023
@bryanboza
Copy link
Member

Fixed, tested locally on the last master and now we are returning 200 instead the 500 error

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OKR : Customer Success Owned by Arno OKR : Customer Support Owned by Scott QA : Approved Release : 22.03.9 Included in LTS patch release 22.03.9 Release : 23.01.5 Included in LTS patch release 23.01.5 Release : 23.09.6 Release Template Builder Team : Bug Fixers Type : Defect
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants