https://discord.umbraco.com logo
#help-with-umbraco
How to hide certain documents from content API
# help-with-umbraco
c

connerwebdev

01/26/2024, 8:52 PM
Hi, I store some private information that I only want to be visible on content delivery api response if request has token in header. I'm still new to Umbraco so not sure how to proceed. Or is there a way to store custom data type which is visible in back office, but not to content API, so i can only access it via custom controller route?
Should note I am aware u can restrict public access but I'd like to try keep it public where i can.
p

prenders

01/27/2024, 10:54 AM
Hey Conner, I wonder if you could use "DisallowedContentTypeAliases" in the Delivery API settings. This way you can setup a node which is visible in the backoffice, but can then be hidden from the API. I often have a 'Settings' node that is not public. So I'd have...
"DisallowedContentTypeAliases": ["settings"]
...in the config.
c

connerwebdev

01/28/2024, 7:34 PM
sweet ill give it a try thanks!