[PR #685] [CLOSED] Added ALWAYS_RENDER_RAW_FILES option to the repository section #15527

Closed
opened 2025-11-02 11:48:39 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/685
Author: @pgaskin
Created: 1/17/2017
Status: Closed

Base: masterHead: master


📝 Commits (4)

  • 2ad4b0f Added ALWAYS_RENDER_RAW_FILES option to the repository section
  • 0adb06c Add ALWAYS_RENDER_RAW_FILES to app.ini
  • 0417356 Removed extra blank lines
  • f2d9e84 Fixed mimetypes

📊 Changes

3 files changed (+17 additions, -1 deletions)

View changed files

📝 conf/app.ini (+3 -0)
📝 modules/setting/setting.go (+4 -0)
📝 routers/repo/download.go (+10 -1)

📄 Description

Used for serving raw files with the right content type, instead of text/plain. Fixes (#683).

This option is disabled by default as it could be a potential security risk because the html in raw mode would render on the same domain as gitea.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/685 **Author:** [@pgaskin](https://github.com/pgaskin) **Created:** 1/17/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`2ad4b0f`](https://github.com/go-gitea/gitea/commit/2ad4b0f3dd671f65b386746960db9f8422a4023a) Added ALWAYS_RENDER_RAW_FILES option to the repository section - [`0adb06c`](https://github.com/go-gitea/gitea/commit/0adb06c491a19861265d9580c2d6ee7a5f526664) Add ALWAYS_RENDER_RAW_FILES to app.ini - [`0417356`](https://github.com/go-gitea/gitea/commit/041735640a504aebf02be945a2f9bfb5cfd63803) Removed extra blank lines - [`f2d9e84`](https://github.com/go-gitea/gitea/commit/f2d9e8401ffbfcfc08b49958fbbd6aa7ca085433) Fixed mimetypes ### 📊 Changes **3 files changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `conf/app.ini` (+3 -0) 📝 `modules/setting/setting.go` (+4 -0) 📝 `routers/repo/download.go` (+10 -1) </details> ### 📄 Description Used for serving raw files with the right content type, instead of text/plain. Fixes (#683). This option is disabled by default as it could be a potential security risk because the html in raw mode would render on the same domain as gitea. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:48:39 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15527