https://github.com/ajsalemo/custom-response-header-examples
Multiple examples on various stacks on how to add custom response headers to an application.
https://github.com/ajsalemo/custom-response-header-examples
apache azure containers docker dotnet http java linux nginx node php python response-headers webserver
Last synced: 3 months ago
JSON representation
Multiple examples on various stacks on how to add custom response headers to an application.
- Host: GitHub
- URL: https://github.com/ajsalemo/custom-response-header-examples
- Owner: Ajsalemo
- Created: 2022-05-23T22:51:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-25T22:58:48.000Z (about 4 years ago)
- Last Synced: 2026-01-03T14:35:31.866Z (6 months ago)
- Topics: apache, azure, containers, docker, dotnet, http, java, linux, nginx, node, php, python, response-headers, webserver
- Language: PHP
- Homepage:
- Size: 1.59 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# custom-response-header-examples
Multiple examples on various stacks on how to add custom response headers to an application.
- **dotnet**
- This contains an example with ASP .NET Core 6 MVC
- Documentation on the ResponseHeaders class can be found [here](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.headers.responseheaders.headers?view=aspnetcore-6.0#microsoft-aspnetcore-http-headers-responseheaders-headers).
- **java**
- This contains an example with Spring Boot
- Spring documentation on adding [headers](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpHeaders.html#set-java.lang.String-java.lang.String-) to a [Response Entity](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ResponseEntity.html).
- **node**
- This contains an example with Express
- [Documentation](https://expressjs.com/en/5x/api.html#res.set) for Express.
- [Documentation](https://nodejs.org/api/http.html#responsesetheadername-value) for plain Node.
- **php**
- This contains an example with Laravel and plain PHP
- Laravel's response object documentation can be found [here](https://laravel.com/docs/9.x/responses#attaching-headers-to-responses)
- PHP header [documentation](https://www.php.net/manual/en/function.header.php)
- **python**
- This contains an example with Flask
- Flask [documentation](https://flask.palletsprojects.com/en/2.1.x/api/?highlight=headers#response-objects) on response headers.
- Django [documentation](https://docs.djangoproject.com/en/4.0/ref/request-response/#setting-header-fields-1) on response headers.