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

Custom headers - Possible Implementation #6690

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stshort
Copy link

@stshort stshort commented Jan 9, 2022

I gave a stab at implementing #4627 / updates for #6683 and this seems to be working for my use case now, and lets users pass additional headers to event source configurations. This lets you set Authorization headers for JSON / iCalendar / Google Calendar feeds.

I didn't run the tests / update tests, because I'm simply trying this out on my project as this functionality being missing is a direct blocker to work that I am currently trying to implement. Pushing this PR so the maintainers can review and take if you would like, it really seems like an easy addition with a lot of added benefits.

Should work for JSON, Google Calendar, and iCalendar feeds, but I'm only using iCalendar on my project. I'm not familiar enough with the fullcalendar source to guarantee this change works across all event sources as intended, but it is now definitely letting me pass an auth header for an ics feed.

@acerix FYI

@stshort
Copy link
Author

stshort commented Feb 18, 2022

@acerix @arshaw any updates / feedback on this implementation? Not being able to support authenticated endpoints for event source fetching seems like a big oversight.

I'll be using this implementation for my project but it would definitely be ideal for some implementation of this to be included in the native package.

If you are interested, I also needed to modify this library to support DATE type for EXDATE entries, and also include the iCalendar event UID to the extendedProps to easily identify which event the user is interacting with. I can raise a PR for this as well if you are interested.
stshort@4762611

It's a hack specifically for my project since I'm hardcoding the onlyDate param to always be true since I'm only using DATE types for exception dates, but the idea should be generalizeable and probably could even be configured as an event source option, or just simply support either/or.

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

Successfully merging this pull request may close these issues.

None yet

2 participants